-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add release workflow This kicks of a "release" whenever a release-* tag is pushed. Signed-off-by: Miek Gieben <[email protected]> * dont delete older releases Signed-off-by: Miek Gieben <[email protected]>
- Loading branch information
Showing
2 changed files
with
47 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
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,46 @@ | ||
on: | ||
push: | ||
tags: | ||
- 'release-*' # Push of a release-* tag | ||
|
||
name: Create Release | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Install systemd lib dependencies | ||
run: | | ||
sudo apt install libsystemd-dev | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: systemk Build | ||
run: go build -v ./... | ||
|
||
- name: Get Epoch SHA | ||
run: echo "EPOCH=`date '+%s'`" >> $GITHUB_ENV | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: tag-${{ env.EPOCH }} | ||
release_name: Release-${{ env.EPOCH }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./systemk | ||
asset_name: systemk | ||
asset_content_type: application/octet-stream |