-
Notifications
You must be signed in to change notification settings - Fork 17
75 lines (64 loc) · 1.86 KB
/
release.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
69
70
71
72
73
74
75
name: goreleaser
on:
push:
tags:
- '*'
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
goreleaser:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- name: Cache Wix Toolset
id: cache-wix
uses: actions/cache@v3
with:
path: C:/wix
key: wix
- name: Set up Wix Toolset
if: steps.cache-wix.outputs.cache-hit != 'true'
run: |
mkdir -p C:/wix
curl -o "C:/wix/wix311-binaries.zip" -OL https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
unzip C:/wix/wix311-binaries.zip -d "C:/wix"
echo "C:\wix" >> $GITHUB_PATH
go install github.com/stirante/go-msi@latest
mkdir ./go-msi-tmp
shell: bash
- name: Sync vendor directory
run: |
go mod vendor
shell: bash
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --clean
- uses: actions/checkout@v2
with:
repository: 'Bedrock-OSS/regolith-action'
token: ${{ secrets.GH_PAT }}
path: './action'
- name: Update GitHub Action
working-directory: './action'
run: |
echo -n "${{github.ref_name}}" > version
git config user.name github-actions
git config user.email [email protected]
git add ./version
git commit -m "Regolith v${{github.ref_name}}"
git tag "v${{github.ref_name}}"
git push origin main
git push --tags