-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·68 lines (60 loc) · 1.71 KB
/
release_auto_update.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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 }}