-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.1 KB
/
publish.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
name: u-root-publish
on:
push:
tags:
- '*'
jobs:
publish:
strategy:
matrix:
template: [core, all, embedded, minimal]
arch: [amd64, arm, arm64, riscv64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: u-root/u-root
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
run: |
go build .
GOARCH=${{ matrix.arch }} ./u-root -uroot-source . \
-o ${{ matrix.arch }}-${{ matrix.template }}.cpio \
${{ matrix.template }}
xz --check=crc32 -9 --lzma2=dict=1MiB \
--stdout ${{ matrix.arch }}-${{ matrix.template }}.cpio | \
dd conv=sync bs=512 \
of=${{ matrix.arch }}-${{ matrix.template }}.cpio.xz
- name: Upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ matrix.arch }}-${{ matrix.template }}.cpio.xz
asset_name: u-root_${{ matrix.arch }}_${{ matrix.template }}.cpio.xz