Skip to content

Commit

Permalink
Fix releases prefix and prevent errors
Browse files Browse the repository at this point in the history
  • Loading branch information
qboileau authored Sep 17, 2024
1 parent bb204f2 commit 49b7e56
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

version-resolver:
major:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ env:
GO_VERSION: 1.22.0

jobs:
check-version:
runs-on: ubuntu-latest
steps:
- name: Check version prefix
shell: bash
run: |
if [ "${{ startsWith(github.event.inputs.version, 'v') }}" == "false" ]; then
echo "Invalid version, need to start with a 'v'"
exit 1
fi
unit-test:
needs: [check-version]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -20,6 +32,7 @@ jobs:
run: go test ./...

integration-test:
needs: [check-version]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 49b7e56

Please sign in to comment.