-
-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (45 loc) · 1.45 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (45 loc) · 1.45 KB
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
name: Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: "1.26.4"
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch the new tag
run: git fetch --tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Snapcraft
run: sudo snap install snapcraft --classic
- name: Clean Snapcraft cache
run: |
sudo rm -rf /home/runner/.cache/snapcraft || true
sudo rm -rf /root/.cache/snapcraft || true
sudo rm -rf ~/.cache/snapcraft || true
mkdir -p /home/runner/.cache/snapcraft/download
mkdir -p /home/runner/.cache/snapcraft/stage-packages
chmod -R 755 /home/runner/.cache/snapcraft
- name: Run GoReleaser
if: steps.tag_version.outputs.new_tag
uses: goreleaser/goreleaser-action@v7
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}