-
Notifications
You must be signed in to change notification settings - Fork 2
100 lines (97 loc) · 2.9 KB
/
release.yaml
File metadata and controls
100 lines (97 loc) · 2.9 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Release
on:
workflow_dispatch:
release:
types:
- published
jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
target:
- aarch64-unknown-linux-gnu
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabihf
- i586-unknown-linux-gnu
- i686-unknown-linux-gnu
- loongarch64-unknown-linux-gnu
- m68k-unknown-linux-gnu
- microblazeel-xilinx-linux-gnu
- microblaze-xilinx-linux-gnu
- mipsel-unknown-linux-gnu
- mipsel-unknown-linux-gnusf
- mips-unknown-linux-gnu
- mips-unknown-linux-gnusf
- mips64el-unknown-linux-gnu
- mips64-unknown-linux-gnu
- or1k-unknown-linux-gnu
- powerpcle-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- riscv32-unknown-linux-gnu
- riscv64-unknown-linux-gnu
- s390x-ibm-linux-gnu
- sh4-multilib-linux-gnu
- x86_64-unknown-linux-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
- name: Build
run: |
sudo rm -rf /opt/*
./scripts/make ${{ matrix.target }}
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}.tar.xz
path: ${{ matrix.target }}.tar.xz
if-no-files-found: error
retention-days: 1
- name: Upload checksum
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}.tar.xz.sha256
path: ${{ matrix.target }}.tar.xz.sha256
if-no-files-found: error
retention-days: 1
release:
name: Release
runs-on: ubuntu-22.04
needs:
- build
if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release
pattern: "*.tar.*"
merge-multiple: true
- name: Generate checksums
run: |
echo "| Filename | Sha256sum |" > RELEASE.md
echo "| -------- | --------- |" >> RELEASE.md
for i in release/*.sha256; do
echo "| $(basename $i .sha256) | $(cat $i) |" >> RELEASE.md
done
- name: Upload artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for i in release/*.tar.xz; do
gh release upload ${{ github.event.release.tag_name }} $i $i.sha256
done
gh release edit ${{ github.event.release.tag_name }} -F RELEASE.md