Skip to content

Commit

Permalink
Merge pull request #72 from flownative/task/update-build
Browse files Browse the repository at this point in the history
Update build workflow
  • Loading branch information
kdambekalns authored Oct 6, 2023
2 parents ebee650 + b200e1d commit 343f104
Showing 1 changed file with 16 additions and 34 deletions.
50 changes: 16 additions & 34 deletions .github/workflows/go.build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches-ignore:
- '**'
tags:
- 'v1.*.*'
- 'v*.*.*'
jobs:

build:
Expand All @@ -15,14 +15,14 @@ jobs:
linux_sha256sum: ${{ steps.calculate-checksums-linux.outputs.linux_sha256sum }}
steps:

- name: Set up Go 1.19
uses: actions/setup-go@v3
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.20
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get dependencies
run: |
Expand Down Expand Up @@ -55,40 +55,22 @@ jobs:
path: beach_linux_amd64.zip

- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}

- name: Upload Release Asset (darwin)
id: upload-release-asset-macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: beach_linux_amd64.zip
asset_name: beach_linux_amd64.zip
asset_content_type: application/zip
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "beach_linux_amd64.zip,beach_darwin_amd64.zip"
artifactContentType: application/zip
generateReleaseNotes: true
makeLatest: true
name: Release ${{ github.ref }}

- name: Calculate checksum (darwin)
id: calculate-checksums-darwin
run: echo "darwin_sha256sum=$(sha256sum beach_darwin_amd64.zip | awk '//{print $1}')" >> $GITHUB_OUTPUT

- name: Upload Release Asset (linux)
id: upload-release-asset-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: beach_darwin_amd64.zip
asset_name: beach_darwin_amd64.zip
asset_content_type: application/zip

- name: Calculate checksum (linux)
id: calculate-checksums-linux
run: echo "linux_sha256sum=$(sha256sum beach_linux_amd64.zip | awk '//{print $1}')" >> $GITHUB_OUTPUT
Expand All @@ -100,10 +82,10 @@ jobs:
steps:

- name: Check out Go code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check out Homebrew code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: flownative/homebrew-flownative
path: homebrew
Expand Down Expand Up @@ -135,7 +117,7 @@ jobs:
git commit -m 'localbeach: update to ${{ github.ref }}'
- name: Push to git
uses: ad-m/github-push-action@v0.6.0
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.FLOWNATIVE_BOT_TOKEN }}
repository: flownative/homebrew-flownative
Expand Down

0 comments on commit 343f104

Please sign in to comment.