This GitHub Action builds RPM files by using a specfile and an archive artifact, usually created during a preceeding build step. Outputs allow RPM files to be uploaded as an Artifact (actions/upload-artifact
) or as a Release Asset (actions/upload-release-asset
).
Create a workflow .yml
file in your repositories .github/workflows
directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.
spec_file
: Path to the spec file. [required]src_archive
: Path to the source archive file (.tar.gz
,.tgz
). [required]
rpm_path
: Path to RPM file found in therpmbuild/RPMS
folderrpm_name
: Name of RPM file taken from the pathrpm_content_type
: Content type for usage withactions/upload-release-asset
based on ./example
name: RPM Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: make build bundle zip
- name: Build RPM
id: rpm_build
uses: loganbickmore/[email protected]
with:
spec_file: 'hello-typescript.spec'
src_archive: 'artifacts/hello-typescript.tar.gz'
- name: Upload artifact
uses: actions/[email protected]
with:
name: Binary RPM Artifact
path: ${{ steps.rpm_build.outputs.rpm_path }}