Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/masahide/golang-release-action
action for golang binary release
https://github.com/masahide/golang-release-action
actions build golang release
Last synced: 3 months ago
JSON representation
action for golang binary release
- Host: GitHub
- URL: https://github.com/masahide/golang-release-action
- Owner: masahide
- License: apache-2.0
- Created: 2019-12-31T13:17:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T14:13:57.000Z (over 3 years ago)
- Last Synced: 2024-04-09T05:37:48.394Z (10 months ago)
- Topics: actions, build, golang, release
- Language: Shell
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# golang-release-action
Build golang code for various architectures and upload to github release pageexample workflows yaml: .github/workflows/release.yml
------------------------------------```yaml
on: release
name: Build release package
jobs:
linux-amd64:
name: linux-amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build,gzip and release
uses: masahide/golang-release-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: amd64
GOOS: linux
darwin-amd64:
name: darwin-amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build,gzip and release
uses: masahide/golang-release-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: amd64
GOOS: darwin
windows-amd64:
name: windows-amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build,gzip and release
uses: masahide/golang-release-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: amd64
GOOS: windows
```env params
------------```
$GITHUB_TOKEN - secrets.GITHUB_TOKEN$GOOS and $GOARCH - The name of the target operating system and compilation architecture.
https://golang.org/doc/install/source#environment$BUILD_DIR - `go build` execution directory (default: repository root)
$BIN_NAME - Build target filename
```