-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.03 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
name: release
on:
release:
types: [created]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Extract tag name
id: tag
uses: actions/github-script@v6
with:
result-encoding: string
script: return context.ref.replace(/refs\/tags\//, '');
- name: Build OSMan
run: |
cd ./build
go build -o ../bin/.cache/build ./cmd
../bin/.cache/build build
- name: Build RPM
id: rpm
uses: outofforest/rpmbuild@main
with:
spec_file: ./build/osman.spec
version: ${{ steps.tag.outputs.result }}
out_dir: ./release
- name: Upload RPM package to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ steps.rpm.outputs.rpm_path }}