-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.16 KB
/
goreleaser.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
name: goreleaser
on:
pull_request:
push:
branches:
- "*"
tags:
- "v*"
workflow_dispatch:
repository_dispatch:
permissions:
contents: write
jobs:
snapshot:
if: startsWith(github.ref, 'refs/tags/') != true
runs-on: ubuntu-latest
container:
image: btwiuse/arch:rust-goreleaser
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run GoReleaser Release
run: goreleaser release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
container:
image: btwiuse/arch:rust-goreleaser
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set safe.directory in container to make git happy
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser Release
run: goreleaser release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}