Skip to content

Commit

Permalink
Bump gha actions
Browse files Browse the repository at this point in the history
- checkout@v4
- setup-go@v5
- Migrate to softprops/action-gh-release@v2

Issue: BALLOT-6
  • Loading branch information
francoisferrand committed May 10, 2024
1 parent 8150561 commit 8adeb00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.15

Expand Down
46 changes: 9 additions & 37 deletions .github/workflows/upload-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.15

Expand All @@ -29,44 +29,16 @@ jobs:

- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ env.VERSION }}
target_commitish: ${{ github.sha }}
name: Release ${{ env.VERSION }}
draft: false
prerelease: false

- name: Upload Tarball
id: upload-tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/ballot-${{ env.VERSION }}.tgz
asset_name: ballot-${{ env.VERSION }}.tgz
asset_content_type: application/tar+gzip

- name: Upload Linux amd64 binary
id: upload-linux-amd64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/ballot-${{ env.VERSION }}/ballot-${{ env.VERSION }}-linux-amd64
asset_name: ballot-${{ env.VERSION }}-linux-amd64
asset_content_type: application/octet-stream

- name: Upload MacOS amd64 binary
id: upload-darwin-amd64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/ballot-${{ env.VERSION }}/ballot-${{ env.VERSION }}-darwin-amd64
asset_name: ballot-${{ env.VERSION }}-darwin-amd64
asset_content_type: application/octet-stream
files: |
./out/ballot-${{ env.VERSION }}.tgz
./out/ballot-${{ env.VERSION }}/ballot-${{ env.VERSION }}-linux-amd64
./out/ballot-${{ env.VERSION }}/ballot-${{ env.VERSION }}-darwin-amd64

0 comments on commit 8adeb00

Please sign in to comment.