-
Notifications
You must be signed in to change notification settings - Fork 6
79 lines (65 loc) · 1.92 KB
/
release.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
71
72
73
74
75
76
77
78
79
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
defaults:
run:
shell: bash
jobs:
release-build:
runs-on: ubuntu-20.04
steps:
- name: checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: setup golang
uses: actions/setup-go@v2
id: go
with:
go-version: 1.16
- name: verify modules
run: go mod verify
- name: set release version env var
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: build tools
run: |
make
- name: fix build artifacts
run: |
for tool in cpusetinfo irqcheck lsnt numalign pagrep splitcpulist sriovctl sriovscan; do
mv _output/$tool $tool-${{ env.RELEASE_VERSION }}-linux-amd64
done
make clean outdir
for tool in cpusetinfo irqcheck lsnt numalign pagrep splitcpulist sriovctl sriovscan; do
mv $tool-${{ env.RELEASE_VERSION}}-linux-amd64 _output/
done
- name: compute signature
run: |
pushd _output && sha256sum * >> ../SHA256SUMS && mv ../SHA256SUMS . && popd
- name: upload build artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: _output/*
release:
needs: [release-build]
runs-on: ubuntu-20.04
steps:
- name: checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 0
# todo: create changelog and/or release body
- name: download again the build artifacts
uses: actions/download-artifact@v4.1.7
with:
name: build-artifacts
- name: create release
uses: ncipollo/release-action@v1
with:
artifacts: "SHA256SUMS,*-v*-linux-amd64"
token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token