Skip to content

Commit

Permalink
feat: version check
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Sep 6, 2022
1 parent f757dfe commit 40959aa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 35 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,29 @@ jobs:
with:
fetch-depth: 0

- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"

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

- name: Build
run: go build -o sib

- name: run
id: ver
run: echo "::set-output name=version::$(./sib version)"

- name: compare
if: ${{ env.VERSION != env.TAG }}
run: exit 1
env:
VERSION: v${{ steps.ver.outputs.version }}
TAG: ${{ steps.previoustag.outputs.tag }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 40959aa

Please sign in to comment.