-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (44 loc) · 1.12 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Release from main
on:
push:
branches:
- main
env:
GWA_API_HOST: api.gov.bc.ca
GWA_CLIENT_ID: gwa-cli
GWA_VERSION: v2
jobs:
release-tag:
name: create release tag
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- id: release
uses: rymndhng/release-on-push-action@v0.28.0
with:
bump_version_scheme: patch
outputs:
version_number: ${{ steps.release.outputs.tag_name }}
goreleaser:
runs-on: ubuntu-latest
needs: release-tag
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: extractions/setup-just@v1
- uses: actions/setup-go@v4
with:
go-version: stable
- name: Run Unit Tests
run: just test
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v1.20.0
args: release --verbose --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLI_VERSION: ${{ needs.release-tag.outputs.version_number }}