Skip to content

Commit

Permalink
fix(build): goreleaser config (#65)
Browse files Browse the repository at this point in the history
* chore: bumo goreleaser/goreleaser-action to v4
* chore: bump actions/download|upload-artifact to v3
* chore: bump actions/checkout to v3
* chore: bump actions/setup-go to v3
* fix: goreleaser archive templating due to deprecation
* fix: goreleaser amd64 v1 config property
* chore(build): list build dist dir

---------

Signed-off-by: Manuel Vogel <[email protected]>
  • Loading branch information
mavogel authored Feb 16, 2023
1 parent f2b3b7a commit fe645a7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 24 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Setup dependencies
Expand All @@ -42,7 +42,7 @@ jobs:
run: |
make build/awsu-linux-amd64
mv build/awsu-linux-amd64 build/awsu-ubuntu-latest-amd64
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: awsu-${{ matrix.os }}-amd64
path: build/awsu-${{ matrix.os }}-amd64
Expand All @@ -52,21 +52,21 @@ jobs:
needs: [artifact-build]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
# need to setup to avoid https://goreleaser.com/deprecations/#builds-for-darwinarm64
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Download macos
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: awsu-macos-latest-amd64
path: build
- name: Download linux
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: awsu-ubuntu-latest-amd64
path: build
Expand All @@ -80,12 +80,15 @@ jobs:
cp build/awsu-macos-latest-amd64 build/awsu_darwin_arm64
ls -lash build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: latest
args: release --clean --skip-publish --snapshot --skip-sign --debug
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
GORELEASER_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
- name: List goreleaser dist folder contents
run: |
ls -lash dist
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Setup dependencies
Expand All @@ -36,7 +36,7 @@ jobs:
run: |
make build/awsu-linux-amd64
mv build/awsu-linux-amd64 build/awsu-ubuntu-latest-amd64
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: awsu-${{ matrix.os }}-amd64
path: build/awsu-${{ matrix.os }}-amd64
Expand All @@ -46,21 +46,21 @@ jobs:
needs: [artifact-build]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
# need to setup to avoid https://goreleaser.com/deprecations/#builds-for-darwinarm64
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Download macos
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: awsu-macos-latest-amd64
path: build
- name: Download linux
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: awsu-ubuntu-latest-amd64
path: build
Expand All @@ -74,7 +74,7 @@ jobs:
cp build/awsu-macos-latest-amd64 build/awsu_darwin_arm64
ls -lash build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Setup Dependencies
Expand Down
13 changes: 8 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ builds:
goarch:
- amd64
- arm64
goamd64:
- v1
prebuilt:
path: build/awsu_{{ .Os }}_{{ .Arch }}
archives:
- replacements:
linux: Linux
darwin: Darwin
amd64: x86_64
arm64: arm
- name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "arm64" }}arm
{{- else }}{{ .Arch }}{{ end }}
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down

0 comments on commit fe645a7

Please sign in to comment.