-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from ConsulTent/master
go-release upgrade
- Loading branch information
Showing
4 changed files
with
76 additions
and
17 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 |
---|---|---|
|
@@ -7,13 +7,13 @@ LABEL "com.github.actions.icon"="cpu" | |
LABEL "com.github.actions.color"="orange" | ||
|
||
LABEL "name"="Automate publishing Go build artifacts for GitHub releases through GitHub Actions" | ||
LABEL "version"="1.0.1" | ||
LABEL "version"="1.0.2" | ||
LABEL "repository"="http://github.com/ngs/go-release.action" | ||
LABEL "homepage"="http://ngs.io/t/actions/" | ||
|
||
LABEL "maintainer"="Atsushi Nagase <[email protected]> (https://ngs.io)" | ||
|
||
RUN apk add --no-cache curl jq git build-base | ||
RUN apk add --no-cache curl jq git build-base bash zip | ||
|
||
ADD entrypoint.sh /entrypoint.sh | ||
ADD build.sh /build.sh | ||
|
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 |
---|---|---|
@@ -1,12 +1,22 @@ | ||
# Go Release Binary GitHub Action | ||
|
||
Automate publishing Go build artifacts for GitHub releases through GitHub Actions | ||
Automate publishing Go build artifacts for GitHub releases through GitHub Actions. | ||
|
||
Detects a build.sh in the go repo and will use that instead. Expects a list of | ||
file artifacts in a single, space delimited line as output for packaging. | ||
|
||
Extra environment variables: | ||
* CMD_PATH | ||
* Pass extra commands to go build | ||
* EXTRA_FILES | ||
* Pass a list of extra files for packaging. | ||
* Example: EXTRA_FILES: "README.md LICENSE" | ||
|
||
```yaml | ||
# .github/workflows/release.yaml | ||
|
||
on: release | ||
name: Build | ||
name: Build Release | ||
jobs: | ||
release-linux-386: | ||
name: release linux/386 | ||
|
@@ -19,6 +29,7 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: "386" | ||
GOOS: linux | ||
EXTRA_FILES: "LICENSE" | ||
release-linux-amd64: | ||
name: release linux/amd64 | ||
runs-on: ubuntu-latest | ||
|
@@ -30,17 +41,31 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: amd64 | ||
GOOS: linux | ||
release-darwin-386: | ||
name: release darwin/386 | ||
EXTRA_FILES: "LICENSE" | ||
release-linux-arm: | ||
name: release linux/386 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: compile and release | ||
uses: ngs/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: "386" | ||
GOOS: darwin | ||
GOARCH: "arm" | ||
GOOS: linux | ||
EXTRA_FILES: "LICENSE" | ||
release-linux-arm64: | ||
name: release linux/amd64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: compile and release | ||
uses: ngs/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: arm64 | ||
GOOS: linux | ||
EXTRA_FILES: "LICENSE" | ||
release-darwin-amd64: | ||
name: release darwin/amd64 | ||
runs-on: ubuntu-latest | ||
|
@@ -52,6 +77,7 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: amd64 | ||
GOOS: darwin | ||
EXTRA_FILES: "LICENSE" | ||
release-windows-386: | ||
name: release windows/386 | ||
runs-on: ubuntu-latest | ||
|
@@ -63,6 +89,7 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: "386" | ||
GOOS: windows | ||
EXTRA_FILES: "LICENSE" | ||
release-windows-amd64: | ||
name: release windows/amd64 | ||
runs-on: ubuntu-latest | ||
|
@@ -74,4 +101,5 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: amd64 | ||
GOOS: windows | ||
EXTRA_FILES: "LICENSE" | ||
``` |
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