-
-
Notifications
You must be signed in to change notification settings - Fork 45
77 lines (61 loc) · 2.31 KB
/
auto_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
name: auto release
on:
push:
tags:
- 'v*.*.*'
- '!*-rc*'
- '!*-beta*'
- '!*-b*'
jobs:
x64-and-x86:
runs-on: windows-2019
defaults:
run:
shell: powershell
steps:
- uses: actions/checkout@v2
- name: Install dpendencies
run: |
choco install -y nsis
choco install -y checksum
- name: Get the version
id: version
run: |
$TAG=$($(echo ${{github.ref}}).Replace('refs/tags/v', ''))
echo "::set-output name=VERSION::$TAG"
- name: Setup x64 MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Build x64 assets
run: ./tools/create_assets.bat ${{steps.version.outputs.VERSION}} -msvc 64
- name: Setup x86 MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Build x86 assets
run: ./tools/create_assets.bat ${{steps.version.outputs.VERSION}} -msvc 32
- name: (Chocolatey) Setup API
run: choco apikey --key ${{secrets.CHOCOLATEY_API_KEY}} --source https://push.chocolatey.org/
- name: (Chocolatey) Create installer
run: ./tools/create_chocolatey_installer.bat ${{steps.version.outputs.VERSION}}
- name: (Chocolatey) Package the installer as nupkg and push the package into chocolatey.org
run: ./tools/push_chocolatey_package.bat ${{steps.version.outputs.VERSION}}
- name: (GitHub) Create release and submit assets
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: |
bin_64/*.zip
bin_64/*.exe
bin_32/*.zip
bin_32/*.exe
choco/*.zip
- name: (winget) Get winget-create
run: iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
- name: (winget) Update the manifest and submit
run: |
$VERSION="${{steps.version.outputs.VERSION}}"
$WINGET_PACK_32="https://github.com/pit-ray/win-vind/releases/download/v${VERSION}/setup_win-vind_${VERSION}_32bit.exe"
$WINGET_PACK_64="https://github.com/pit-ray/win-vind/releases/download/v${VERSION}/setup_win-vind_${VERSION}_64bit.exe"
./wingetcreate.exe update -u $WINGET_PACK_32 $WINGET_PACK_64 -v $VERSION -t ${{secrets.WINGET_GITHUB_TOKEN}} -s pit-ray.win-vind