Skip to content

Commit

Permalink
Added unit test to release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelloeater committed Sep 22, 2024
1 parent 8d9a354 commit 284e1f9
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,25 @@ permissions:
issues: write

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.0
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -v ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...

goreleaser:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -33,7 +51,7 @@ jobs:

- name: Release config
run: |
cat << EOF > /goreleaser-github.yaml
cat << EOF > /tmp/goreleaser-github.yaml
project_name: stampy
version: 2
builds:
Expand Down Expand Up @@ -90,7 +108,7 @@ jobs:
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: "~> v2"
args: release --clean --verbose --config /goreleaser-github.yaml
args: release --clean --verbose --config /tmp/goreleaser-github.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
Expand Down

0 comments on commit 284e1f9

Please sign in to comment.