From 824dd347a541f26e64ef1c571a3f92e0e8571764 Mon Sep 17 00:00:00 2001 From: Enrico Maria Crisostomo Date: Mon, 30 Dec 2024 01:30:30 +0100 Subject: [PATCH] Add GitHub Actions workflow for releasing tarball on tag push --- .github/workflows/release-tarball.yml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/release-tarball.yml diff --git a/.github/workflows/release-tarball.yml b/.github/workflows/release-tarball.yml new file mode 100644 index 00000000..3af5bde6 --- /dev/null +++ b/.github/workflows/release-tarball.yml @@ -0,0 +1,41 @@ +name: Release tarball + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: debian-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y autoconf automake autopoint gettext git libtool make texinfo g++ + + - name: Run autogen + run: ./autogen.sh + + - name: Configure + run: | + export CC=gcc CXX=g++ + ./configure + + - name: Build and Test + run: make distcheck + + - name: Extract Tag Name + id: extract_tag + run: echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./fswatch-${{ env.TAG_NAME }}.tar.gz + asset_name: fswatch-${{ env.TAG_NAME }}.tar.gz + asset_content_type: application/gzip \ No newline at end of file