Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

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: test
# run: just test
# - name: generate commands documentation
# run: just docs
# - name: Commit docs
# uses: EndBug/add-and-commit@v9
# with:
# default_author: github_actions
# message: 'Generate new docs'
# add: 'docs/*.md'
- 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 }}