forked from elastic/go-libaudit
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (58 loc) · 1.46 KB
/
release-auparse.yml
File metadata and controls
58 lines (58 loc) · 1.46 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
name: Release Auparse
on:
push:
branches:
- 'feature/release'
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
type: string
default: '2.5.0'
permissions:
contents: read
jobs:
build:
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
os: [ linux, darwin ]
arch: [ amd64, arm64 ]
env:
tag: ${{ inputs.version }}-${{ matrix.os }}-${{ matrix.arch }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
tag: 'refs/tags/v${{ inputs.version }}'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.6
- name: Build
run: |
GOOS="${{ matrix.os }}" GOARCH="${{ matrix.arch }}" go build -o bin/auparse-${{ env.tag }} cmd/auparse/auparse.go
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: auparse-${{ env.tag }}
path: bin/auparse-${{ env.tag }}
release:
name: Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
path: bin
- name: Release
uses: softprops/action-gh-release@v2
with:
files: bin/auparse-*
name: '${{ inputs.version }}'
tag_name: '${{ inputs.version }}'
generate_release_notes: true
token: '${{ secrets.GITHUB_TOKEN }}'