-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (78 loc) · 2.38 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
78
79
80
81
82
83
name: Build
on:
push:
branches:
- trunk
tags:
- 'v*'
jobs:
build:
name: Build - ${{ matrix.platform.release_for }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- release_for: ARM64 Linux
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
bin: wiki-extractor
name: wiki-extractor-gnu-linux-aarch64
- release_for: 32-bit MSVC
os: windows-latest
target: i686-pc-windows-msvc
bin: wiki-extractor.exe
name: wiki-extractor-windows-i686.exe
- release_for: 32-bit Linux
os: ubuntu-latest
target: i686-unknown-linux-gnu
bin: wiki-extractor
name: wiki-extractor-gnu-linux-i686
- release_for: 64-bit macOS
os: macos-latest
target: x86_64-apple-darwin
bin: wiki-extractor
name: wiki-extractor-darwin-x86_64
- release_for: 64-bit MSVC
os: windows-latest
target: x86_64-pc-windows-msvc
bin: wiki-extractor.exe
name: wiki-extractor-windows-x86_64.exe
- release_for: 64-bit Linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
bin: wiki-extractor
name: wiki-extractor-gnu-linux-x86_64
- release_for: 64-bit FreeBSD
os: ubuntu-latest
target: x86_64-unknown-freebsd
bin: wiki-extractor
name: wiki-extractor-freebsd-x86_64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- uses: clechasseur/rs-cargo@v2
with:
command: build
args: --release --all-features
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.name }}
path: target/release/${{ matrix.platform.bin }}
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
./wiki-extractor-*