-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup GitHub Actions Workflow for building and publishing release assets #33
Comments
Found this existing workflow that appears to be a fantastic starting point: https://github.com/trntv/wilson/blob/master/.github/workflows/release.yml name: Release
on: [create]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: |
GOOS=darwin GOARCH=amd64 go build -o bin/wilson_darwin_amd64 github.com/trntv/wilson/cmd/wilson
GOOS=linux GOARCH=amd64 go build -o bin/wilson_linux_amd64 github.com/trntv/wilson/cmd/wilson
GOOS=windows GOARCH=amd64 go build -o bin/wilson_windows_amd64 github.com/trntv/wilson/cmd/wilson
tar cvf - bin/wilson_darwin_amd64 | gzip -n > bin/wilson-darwin-amd64.tar.gz
tar cvf - bin/wilson_linux_amd64 | gzip -n > bin/wilson-linux-amd64.tar.gz
tar cvf - bin/wilson_windows_amd64 | gzip -n > bin/wilson-windows-amd64.tar.gz
sha256sum bin/wilson-darwin-amd64.tar.gz >> bin/checksums.txt
sha256sum bin/wilson-linux-amd64.tar.gz >> bin/checksums.txt
sha256sum bin/wilson-windows-amd64.tar.gz >> bin/checksums.txt
- name: Publish release
uses: ncipollo/release-action@v1
with:
artifacts: "bin/wilson_linux_amd64, bin/wilson_darwin_amd64, bin/wilson-linux-amd64.tar.gz, bin/wilson-darwin-amd64.tar.gz, bin/checksums.txt"
token: ${{ secrets.GITHUB_TOKEN }} |
Worth noting: https://github.com/go-task/task/blob/master/.goreleaser.yml They're using goreleaser to build/generate release assets. They're running goreleaser whenever a new tag is created: https://github.com/go-task/task/blob/master/.github/workflows/release.yml name: goreleaser
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Untested workflow for conditionally generating a "stable" release or a prerelease based on the tag associated with the workflow execution. If not explicitly opted-out by the calling workflow, release assets are generated using the podman-release-build Makefile recipe. refs atc0005/todo#33 refs atc0005/todo#45
Provide workflow for conditionally generating a "stable" release or a prerelease based on the tag associated with the workflow execution. If not explicitly opted-out by the calling workflow, release assets are generated using the podman-release-build Makefile recipe. refs atc0005/todo#33 refs atc0005/todo#45
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
Provide workflow used to automate the creation of GitHub releases upon pushing a tag. The "upstream" workflow imported by this one applies conditional logic (based on tag name) to determine whether a stable or pre-release GitHub release is created. By default, release assets are generated and provided by the release. Library projects explicitly forgo the explicit generation of release assets. refs atc0005/todo#33 refs atc0005/todo#45 refs atc0005/todo#65 refs atc0005/shared-project-resources#141
There doesn't appear to be an official "action" for this, but there are a number of community/marketplace implementations available to choose from.
This one stood out:
Reasoning:
I would rather have release assets generated via CI than me generating them locally and uploading them. While I don't mind doing the work myself, having CI handle the task should (hopefully) provide both a consistent result and would generate them files using a trusted/verifiable process.
The text was updated successfully, but these errors were encountered: