Release_auto_update #13
Workflow file for this run
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: Release_auto_update | |
on: | |
release: | |
types: | |
- published | |
# push: | |
# tags: | |
# - 'v*' | |
# workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
go-version: [1.22.0] | |
platform: [macOS-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@main | |
- name: Install Go | |
if: success() | |
uses: actions/setup-go@main | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
with: | |
version: 3.x | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Parse Event | |
run: task ak:tag | |
- name: Build and pack | |
run: task ak:build-and-pack | |
- uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: "${{ env.artifact }}" | |
release: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 0 # note the fetch-depth: 0 input in Checkout step. It is required for the changelog to work correctly. | |
- uses: actions/setup-go@main | |
- name: Install Task | |
uses: arduino/setup-task@main | |
with: | |
version: 3.x | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: goreleaser/goreleaser-action@v6 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
version: '~> v2' | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution | |
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} |