fix: improves error trapping when there are no changes since start tag. #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20.3' | |
- name: Install dependencies | |
run: go mod download | |
- name: Test | |
run: go test -v ./... | |
- name: Build | |
run: go build | |
- name: Dryrun changelog | |
run: | | |
./since project changes > /tmp/changes.md | |
cat /tmp/changes.md | |
- name: Dry run | |
uses: goreleaser/goreleaser-action@v2 | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
with: | |
version: latest | |
args: release --snapshot | |
- name: Release | |
uses: goreleaser/goreleaser-action@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }} |