Skip to content

Commit

Permalink
fix: goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain committed Aug 23, 2024
1 parent 283c3e1 commit f0319db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 32 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/on-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Validate Tag
run: |
node -e "if (!/^v\d+\.\d+\.\d+$/.test('${{ github.ref_name }}')) { console.error('Invalid version provided');process.exit(1);}"
- name: Validate VERSION
run: |
version=$(cat cmd/thor/VERSION)
tag="${{ github.ref_name }}"
tag="${tag#v}" # Remove the "v" prefix from the tag
if [ "$tag" != "$version" ]; then
echo "VERSION file does not match tag"
exit 1
fi
- name: Validate Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This step validates that the tag is an official release
run: |
prerelease=$(gh release view ${{ github.ref_name }} --json isPrerelease | jq -r '.isPrerelease')
if [ "$prerelease" != "false" ]; then
echo "Tag is not an official release"
exit 1
fi
- name: Publish Binaries
uses: goreleaser/goreleaser-action@v6
with:
Expand Down
6 changes: 4 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ builds:
- amd64
- arm64
id: thor
hooks:
pre: make thor
binary: ./bin/thor
command: make thor
- env:
- CGO_ENABLED=0
goos:
Expand All @@ -31,7 +32,8 @@ builds:
- arm64
id: disco
binary: ./bin/disco
command: make disco
hooks:
pre: make disco

release:
github:
Expand Down

0 comments on commit f0319db

Please sign in to comment.