From 296b7280656fa91cb1b5797c69750d5c8c1d7614 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 7 Feb 2024 09:21:19 +0100 Subject: [PATCH] Add GitHub Action to automatically build and upload release assets. --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..d146e91d6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Release + +on: + release: + types: [released, prereleased] + +permissions: + contents: write + +defaults: + run: + shell: bash + +jobs: + asset: + runs-on: ubuntu-latest + container: collectd/ci:debian12 + steps: + - uses: actions/checkout@v4 + - run: | + git config --global --add safe.directory "$(pwd)" + git submodule init -- opentelemetry-proto + git submodule update -- opentelemetry-proto + - name: Generate configure script + run: ./build.sh + - name: Run configure script + run: ./configure + - name: Run make distcheck + run: make -j $(nproc) distcheck + - name: Upload distribution package + run: | + ls -l *.bz2 + [[ -e "${GITHUB_REF#refs/tags/}.tar.bz2" ]] && gh release upload "${GITHUB_REF}" "${GITHUB_REF#refs/tags/}.tar.bz2" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} -- 2.47.2