-
Notifications
You must be signed in to change notification settings - Fork 171
90 lines (77 loc) · 2.18 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
83
84
85
86
87
88
89
90
name: Releases
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches:
- master
jobs:
build-windows-x86_64:
runs-on: windows-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: msys2/setup-msys2@v2
with:
update: true
path-type: inherit
install: >-
curl
make
cmake
- shell: msys2 {0}
run: |
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-make mingw-w64-x86_64-curl libcurl openssl-devel libcurl-devel autoconf texinfo mingw-w64-x86_64-libtool --noconfirm
make
mkdir txiki-windows-x86_64
cp build/tjs.exe txiki-windows-x86_64/tjs.exe
cd txiki-windows-x86_64
ldd tjs.exe | grep -v '=> /c/Windows/.*' | awk '{print $3}' | xargs -I '{}' cp -v '{}' .
- name: Upload windows x86_64 Artifact
uses: actions/upload-artifact@v4
with:
name: txiki-windows-x86_64
path: txiki-windows-x86_64
build-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: build macos-latest
run: |
brew install cmake autoconf automake libtool texinfo
make BUILD_MACOS_MULTIARCH=1
mkdir txiki-macos
cp build/tjs txiki-macos/tjs
- name: Upload macos Artifact
uses: actions/upload-artifact@v4
with:
name: txiki-macos
path: txiki-macos
release:
needs: [build-windows-x86_64, build-macos]
name: release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
pattern: txiki-*
merge-multiple: false
- name: compress
run: |
cd dist
for dir in */; do zip -r "${dir%/}.zip" "$dir"; done
- name: Release
uses: softprops/action-gh-release@v2
with:
files: "dist/*.zip"