Skip to content
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

Closed
atc0005 opened this issue Oct 31, 2019 · 5 comments
Closed
Assignees

Comments

@atc0005
Copy link
Owner

atc0005 commented Oct 31, 2019

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.

@atc0005 atc0005 self-assigned this Oct 31, 2019
@atc0005
Copy link
Owner Author

atc0005 commented Jan 16, 2020

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 }}

@atc0005
Copy link
Owner Author

atc0005 commented Feb 3, 2020

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 }}

@atc0005 atc0005 transferred this issue from atc0005/elbow Sep 29, 2020
@atc0005 atc0005 pinned this issue Mar 23, 2023
atc0005 added a commit to atc0005/shared-project-resources that referenced this issue Jul 19, 2023
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
atc0005 added a commit to atc0005/shared-project-resources that referenced this issue Jul 19, 2023
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
@atc0005 atc0005 closed this as completed Jul 19, 2023
@atc0005 atc0005 unpinned this issue Jul 19, 2023
atc0005 added a commit to atc0005/bounce that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/brick that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/bridge that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/check-cert that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/check-illiad that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/check-mail that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/check-ntpt that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/check-path that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/check-statuspage that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/check-vmware that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/check-whois that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/dnsc that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/elbow that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/go-ezproxy that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/go-lockss that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/mysql2sqlite that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/go-nagios that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/go-teams-notify that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/nagios-debug that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/query-meta that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/safelinks that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/send2teams that referenced this issue Jul 20, 2023
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
atc0005 added a commit to atc0005/tsm-pass that referenced this issue Jul 20, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant