-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (79 loc) · 2.61 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
76
77
78
79
80
81
82
name: release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
cache: true
- name: Set up Wix Toolset
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 --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
with:
repository: 'MCDevKit/cmcc-docs'
token: ${{ secrets.GH_PAT }}
path: './docs'
- name: Push docs
working-directory: './docs'
run: |
cd json-templating-engine
../../dist/win_binary_windows_amd64_v1/jsonte.exe docgen
cd ..
git config user.name github-actions
git config user.email github-actions@github.com
git add ./json-templating-engine/*
git commit -m "JSON Templating Engine v${{github.ref_name}}"
git push origin github_pages
- uses: actions/checkout@v2
with:
repository: 'MCDevKit/regolith-library'
token: ${{ secrets.GH_PAT }}
path: './regolith-library'
- name: Copy artifacts
working-directory: './regolith-library'
run: |
cp ../dist/win_binary_windows_amd64_v1/jsonte.exe ./jsonte/
cp ../dist/binary_linux_amd64_v1/jsonte ./jsonte/jsonte-linux
cp ../dist/binary_darwin_amd64_v1/jsonte ./jsonte/jsonte-mac
chmod +x ./jsonte/jsonte-linux
chmod +x ./jsonte/jsonte-mac
git config user.name github-actions
git config user.email github-actions@github.com
git add ./jsonte/jsonte.exe
git add ./jsonte/jsonte-linux
git add ./jsonte/jsonte-mac
git commit -m "JSON Templating Engine v${{github.ref_name}}"
git push origin main
git tag jsonte-${{ github.ref_name }}
git push --tags