release #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |