Skip to content

Commit 47bacde

Browse files
committed
Add release workflow
1 parent ed5a6eb commit 47bacde

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Release tag name'
8+
required: true
9+
type: string
10+
11+
defaults:
12+
run:
13+
shell: 'bash -Eeuo pipefail -x {0}'
14+
15+
jobs:
16+
build-release:
17+
name: Build and Release
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install dependencies
25+
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends binfmt-support qemu-user-static
26+
27+
- name: Build binaries
28+
run: ./build.sh
29+
30+
- name: Test binaries
31+
run: |
32+
./test.sh gosu-amd64
33+
./test.sh gosu-i386
34+
./test.sh --debian gosu-amd64
35+
./test.sh --debian gosu-i386
36+
37+
- name: Run govulncheck
38+
run: |
39+
for gosu in gosu-*; do
40+
./govulncheck-with-excludes.sh -mode=binary "$gosu"
41+
done
42+
43+
- name: Create Release
44+
uses: softprops/action-gh-release@v2
45+
with:
46+
tag_name: ${{ inputs.tag }}
47+
name: ${{ inputs.tag }}
48+
generate_release_notes: true
49+
files: |
50+
gosu-*
51+
SHA256SUMS

0 commit comments

Comments
 (0)