-
Notifications
You must be signed in to change notification settings - Fork 472
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 build release artifacts (#916)
* Add Github action to build release artifacts * some improvements * disable travis deploy * fix line endings
- Loading branch information
Showing
3 changed files
with
86 additions
and
29 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,51 @@ | ||
name: "Build release artifacts" | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: Get version from tag | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
run: echo "TRAVIS_TAG=${{ github.ref_name }}" >> $GITHUB_ENV | ||
|
||
- run: make release | ||
- run: make dgoss-sha256 dcgoss-sha256 kgoss-sha256 | ||
|
||
- name: "Upload binary as artifact" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
retention-days: 5 | ||
if-no-files-found: error | ||
name: build | ||
path: | | ||
release/* | ||
extras/*/*goss | ||
extras/*/*goss.sha256 | ||
attach-assets: | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
needs: ["build"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch all binaries | ||
uses: actions/download-artifact@v4 | ||
- name: Attach to release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: build/** | ||
fail_on_unmatched_files: true |
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