Skip to content

Commit

Permalink
update go version in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
useEffects committed Jul 27, 2024
1 parent 563b272 commit df2a0ea
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.17'
go-version: '1.22.3'

- name: Build binary
run: |
mkdir -p dist
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -o dist/myapp-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -o dist/golox-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: myapp-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
path: dist/myapp-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
name: golox-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
path: dist/golox-${{ matrix.GOOS }}-${{ matrix.GOARCH }}

release:
needs: build
Expand All @@ -54,6 +54,11 @@ jobs:
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22.3'

- name: Calculate next version
id: vars
run: |
Expand Down Expand Up @@ -81,10 +86,10 @@ jobs:
draft: false
prerelease: false

- name: Download binaries
- name: Download Linux binary
uses: actions/download-artifact@v2
with:
name: myapp-linux-amd64
name: golox-linux-amd64
path: dist/

- name: Upload Linux binary to release
Expand All @@ -93,14 +98,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/myapp-linux-amd64
asset_name: myapp-linux-amd64
asset_path: dist/golox-linux-amd64
asset_name: golox-linux-amd64
asset_content_type: application/octet-stream

- name: Download binaries
- name: Download Windows binary
uses: actions/download-artifact@v2
with:
name: myapp-windows-amd64
name: golox-windows-amd64
path: dist/

- name: Upload Windows binary to release
Expand All @@ -109,14 +114,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/myapp-windows-amd64
asset_name: myapp-windows-amd64
asset_path: dist/golox-windows-amd64
asset_name: golox-windows-amd64
asset_content_type: application/octet-stream

- name: Download binaries
- name: Download macOS binary
uses: actions/download-artifact@v2
with:
name: myapp-darwin-amd64
name: golox-darwin-amd64
path: dist/

- name: Upload macOS binary to release
Expand All @@ -125,6 +130,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/myapp-darwin-amd64
asset_name: myapp-darwin-amd64
asset_path: dist/golox-darwin-amd64
asset_name: golox-darwin-amd64
asset_content_type: application/octet-stream

0 comments on commit df2a0ea

Please sign in to comment.