Skip to content

Commit

Permalink
Add GitHub Action to automatically build and upload release assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
octo committed Feb 7, 2024
1 parent 0dc7c0c commit 9048e9d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit 9048e9d

Please sign in to comment.