-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 2.09 KB
/
build.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: build
run-name: build and upload releases
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
check-bats-version:
runs-on: windows-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22.5'
- name: Check out code
uses: actions/checkout@v2
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: base-devel
- name: Install Go in MSYS2
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm go
shell: msys2 {0}
- name: Ensure Go is in PATH
run: echo "export PATH=$PATH:/c/Go/bin" >> $GITHUB_ENV
shell: bash
- name: Run build script in Git Bash
shell: msys2 {0}
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm git unzip zip
sh scripts/build.sh
- name: Zip dist folder
run: Compress-Archive -Path .\dist\* -DestinationPath .\dist.zip
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload .zip Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\dist.zip
asset_name: kaption-${{ github.ref }}-no_model.zip
asset_content_type: application/zip
- name: Upload start.exe files
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\dist\start.exe
asset_name: start-${{ github.ref }}.exe
asset_content_type: application/octet-stream