Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,45 @@ jobs:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.ref }}
- uses: actions/setup-go@v2

- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: '^1.22.1'
- run: go test ./...

release:
name: Release
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.ref }}

- name: Get version
id: get_version
run: |
VERSION="$(echo '${{ github.ref }}' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | tr -d '\n')"
echo "::set-output name=version::${VERSION}"
- run: git fetch --unshallow

- name: Fetch all tags
run: git fetch --unshallow

- name: Generate Changelog
id: generate_changelog
uses: PSanetra/git-semver-actions/markdown-log@master
uses: PSanetra/git-semver-actions/markdown-log@master # use latest until PWC forks it and maintains.
with:
version: ${{ steps.get_version.outputs.version }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down