Skip to content

Commit

Permalink
Build RPM package (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
outofforest authored Apr 18, 2022
1 parent 5cf7453 commit 07b72f5
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
- uses: actions/github-script@v6
name: Extract tag name
id: tag
with:
result-encoding: string
script: return context.ref.replace(/refs\/tags\//, '');
- run: |
curl https://raw.githubusercontent.com/outofforest/build/main/build > /tmp/outofforest-build
chmod u+x /tmp/outofforest-build
/tmp/outofforest-build . build
name: Build OSMan
- uses: outofforest/rpmbuild@main
name: Build RPM
id: rpm
with:
spec_file: ./build/osman.spec
version: ${{ steps.tag.outputs.result }}
out_dir: ./release
- uses: svenstaro/upload-release-action@v2
name: Upload RPM package to release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ steps.rpm.outputs.rpm_path }}
25 changes: 25 additions & 0 deletions build/osman.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Name: osman
Version: %version
Release: 1
Summary: Tool to manage OS images
URL: https://github.com/outofforest/osman
License: MIT

Requires: zfs

%description
Tool to manage OS images

%prep
%setup

%setup

%install
mkdir -p %{buildroot}/usr/bin
cp ./bin/osman-app %{buildroot}/usr/bin/osman

%files
/usr/bin/osman

%post

0 comments on commit 07b72f5

Please sign in to comment.