-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow for releasing tarball on tag push
- Loading branch information
1 parent
a8a3d0c
commit 824dd34
Showing
1 changed file
with
41 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,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 |