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

fix(build): goreleaser config #65

Merged
merged 7 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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