-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.62 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
name: build
on:
push:
branches: "*"
jobs:
build:
strategy:
matrix:
target:
- aarch64-linux-musl
- armv7-linux-musleabihf
- x86_64-linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- run: |
cp config.mak musl-cross-make
make -C musl-cross-make 2>&1 >> build-$TARGET.log
make -C musl-cross-make install 2>&1 >> build-$TARGET.log
tar -czvf xcc-$TARGET.tar.gz /opt/xcc
env:
TARGET: ${{ matrix.target }}
- uses: actions/upload-artifact@v3
with:
name: xcc-${{ matrix.target }}.tar.gz
path: xcc-${{ matrix.target }}.tar.gz
- uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.target }}.log
path: build-${{ matrix.target }}.log
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: artifacts
- uses: actions/github-script@v6
with:
script: |
const version = context.sha.substring(0, 8);
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${version}`,
sha: context.sha
});
core.setOutput('version', version);
id: create-tag
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.create-tag.outputs.version }}
files: artifacts/**/*.tar.gz
needs: build