-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (58 loc) · 1.52 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
name: CI
on:
push:
branches: [ "main" ]
tags:
- v*
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.settings.host }}
strategy:
fail-fast: false
matrix:
settings:
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: macos-latest
target: x86_64-apple-darwin
- host: macos-latest
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v3
- run: rustup target add ${{ matrix.settings.target }}
- name: Build dbg-swc
run: cargo install dbg-swc --target ${{ matrix.settings.target }}
- name: Copy files
shell: bash
run: |
ls -al ~/.cargo/bin
cp ~/.cargo/bin/dbg-swc* dbg-swc-${{ matrix.settings.target }}
- uses: actions/upload-artifact@v3
with:
name: dbg-swc
path: |
dbg-swc-${{ matrix.settings.target }}
release:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/download-artifact@v3
with:
name: dbg-swc
path: bins
- name: Display structure of downloaded files
shell: bash
run: ls -R
working-directory: bins
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bins/*