-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (64 loc) · 2.17 KB
/
prepare-go-wsllinks-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
name: Prepare QCW go-wsllinks (from revision)
on:
workflow_dispatch:
workflow_call:
outputs:
gowsllinks_version:
description: go-wsllinks version"
value: ${{ jobs.build.outputs.gowsllinks_version }}
env:
GOWSLLINKS_GITURL: https://github.com/arixmkii/go-wsllinks.git
GOWSLLINKS_SHA: 7a099c056aca088c41aa78c9ec15252df6dfd28a # v0.0.3
GOWSLLINKS_VERSION: 0.0.3
jobs:
build:
runs-on: windows-latest
outputs:
gowsllinks_version: ${{ steps.make_versions.outputs.gowsllinks }}
steps:
- name: "🏗️ Install msys2"
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
make git unzip base-devel mingw-w64-ucrt-x86_64-toolchain zip mingw-w64-ucrt-x86_64-go
- name: "📝 Configure checkout"
run: git config --global core.autocrlf input
- name: "📝 Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: "📝 Fetch sources"
shell: msys2 {0}
run: |
mkdir go-wsllinks-release
cd go-wsllinks-release
git init
git remote add origin $GOWSLLINKS_GITURL
git fetch --depth 1 origin $GOWSLLINKS_SHA
git checkout FETCH_HEAD
- name: "🛠️ Build go-wsllinks"
working-directory: go-wsllinks-release
shell: msys2 {0}
run: |
go build -ldflags="-s -w"
- name: "📦 Pack go-wsllinks"
shell: msys2 {0}
run: |
mkdir -p qcw
cp "go-wsllinks-release/go-wsllinks.exe" qcw/
cd qcw
find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums
cat sha.checksums
- id: make_versions
name: "📌 Export versions"
shell: msys2 {0}
run: |
echo "gowsllinks=$GOWSLLINKS_VERSION" >> "$GITHUB_OUTPUT"
- name: "🚀 Upload artifact"
uses: actions/upload-artifact@v4
with:
name: qcw-go-wsllinks
path: qcw