Skip to content

Commit 58d5940

Browse files
committed
chore: various additional updates
chore: wip chore: wip
1 parent 441520a commit 58d5940

20 files changed

Lines changed: 2143 additions & 208 deletions

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: goto-bus-stop/setup-zig@v2
20+
with:
21+
version: master
22+
23+
- name: Build
24+
run: zig build
25+
26+
- name: Test
27+
run: zig build test
28+
29+
build:
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
target:
34+
- x86_64-linux
35+
- aarch64-linux
36+
- x86_64-macos
37+
- aarch64-macos
38+
- x86_64-windows
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- uses: goto-bus-stop/setup-zig@v2
43+
with:
44+
version: master
45+
46+
- name: Build (${{ matrix.target }})
47+
run: zig build -Dtarget=${{ matrix.target }} -Doptimize=ReleaseFast

.github/workflows/release.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
include:
17+
- target: x86_64-linux
18+
artifact: regex-linux-x64
19+
- target: aarch64-linux
20+
artifact: regex-linux-arm64
21+
- target: x86_64-macos
22+
artifact: regex-darwin-x64
23+
- target: aarch64-macos
24+
artifact: regex-darwin-arm64
25+
- target: x86_64-windows
26+
artifact: regex-windows-x64.exe
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: goto-bus-stop/setup-zig@v2
31+
with:
32+
version: master
33+
34+
- name: Build (${{ matrix.target }})
35+
run: zig build -Dtarget=${{ matrix.target }} -Doptimize=ReleaseFast
36+
37+
- name: Rename binary
38+
run: |
39+
if [[ "${{ matrix.target }}" == *"windows"* ]]; then
40+
mv zig-out/bin/regex.exe zig-out/bin/${{ matrix.artifact }}
41+
else
42+
mv zig-out/bin/regex zig-out/bin/${{ matrix.artifact }}
43+
fi
44+
45+
- name: Upload artifact
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: ${{ matrix.artifact }}
49+
path: zig-out/bin/${{ matrix.artifact }}
50+
51+
release:
52+
needs: build
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0
58+
59+
- uses: actions/download-artifact@v4
60+
with:
61+
path: artifacts
62+
merge-multiple: true
63+
64+
- name: List artifacts
65+
run: ls -la artifacts/
66+
67+
- uses: stacksjs/action-releaser@v1.2.7
68+
with:
69+
token: ${{ secrets.GITHUB_TOKEN }}
70+
files: |
71+
artifacts/regex-linux-x64
72+
artifacts/regex-linux-arm64
73+
artifacts/regex-darwin-x64
74+
artifacts/regex-darwin-arm64
75+
artifacts/regex-windows-x64.exe

0 commit comments

Comments
 (0)