From: Florian Forster Date: Wed, 7 Feb 2024 08:21:19 +0000 (+0100) Subject: Add GitHub Action to automatically build and upload release assets. X-Git-Tag: collectd-6.0.0.rc2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9048e9df69ad60323b7686b722802c629507890b;p=thirdparty%2Fcollectd.git Add GitHub Action to automatically build and upload release assets. --- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..4f3a008ca --- /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: | + echo "GITHUB_REF_NAME=\"${GITHUB_REF_NAME}\"" + [[ -e "${GITHUB_REF_NAME:?}.tar.bz2" ]] && gh release upload "${GITHUB_REF_NAME:?}" "${GITHUB_REF_NAME:?}.tar.bz2" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}