-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Action to automatically build and upload release assets.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |