-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (66 loc) · 2 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
name: Build Toolchain
on:
push:
branches:
- main
tags:
- v**
pull_request:
jobs:
build:
name: Build Toolchain
runs-on: ubuntu-22.04
strategy:
matrix:
target_arch: [aarch64, arm, i686, x86_64]
steps:
- name: Checkout Repo
uses: actions/checkout@main
with:
path: ${{ github.workspace }}
- name: Build Toolchain
env:
TOOLCHAIN_ARCH: ${{ matrix.target_arch }}
run: |
bash ./build.sh
- name: Waiting for debugger
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: Upload Build Archive
uses: actions/upload-artifact@v2
with:
name: newer-toolchain-${{ matrix.target_arch }}-${{ github.sha }}
path: ${{ github.workspace }}/build/
release:
name: Create Github Release
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
needs: build
runs-on: ubuntu-22.04
steps:
- name: Fetch archives
uses: actions/download-artifact@v2
with:
path: ./
- name: Copy archives
run: |
cp newer-toolchain-*-${{ github.sha }}/*.tar.bz2 ./
- name: Get checksums
id: checksums
run: |
checksums=$(printf 'SHA-256:\n```\n%s\n```\n' "$(sha256sum *.tar.bz2)")
checksums="${checksums//'%'/'%25'}"
checksums="${checksums//$'\n'/'%0A'}"
checksums="${checksums//$'\r'/'%0D'}"
echo "::set-output name=checksums::$checksums"
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Publish GitHub release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.tar.bz2"
file_glob: true
release_name: "Android NDK toolchain version r17c with gcc"
tag: ${{ steps.tag.outputs.tag }}
body: ${{ steps.checksums.outputs.checksums }}