Skip to content

Master (#4)

Master (#4) #8

Workflow file for this run

# Build RPM
name: Build RPM Package
on:
push:
branches:
- 'release/*'
jobs:
build:
runs-on: ubuntu-latest
env:
RPM_VERSION: ${{ steps.set_vars.outputs.rpm_version }}

Check failure on line 13 in .github/workflows/build-rpm.yml

View workflow run for this annotation

GitHub Actions / Build RPM Package

Invalid workflow file

The workflow is not valid. .github/workflows/build-rpm.yml (Line: 13, Col: 20): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.set_vars.outputs.rpm_version .github/workflows/build-rpm.yml (Line: 14, Col: 20): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.set_vars.outputs.rpm_release
RPM_RELEASE: ${{ steps.set_vars.outputs.rpm_release }}
TAR_VERSION: ${{ steps.set_vars.outputs.tar_version }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set Variables
id: set_vars
run: |
echo "::set-output name=rpm_version::$(echo "${{ github.ref }}" | sed 's|refs/heads/release/||')"
echo "::set-output name=rpm_release::$(git rev-parse --short=8 HEAD)"
echo "::set-output name=tar_version::${{ steps.set_vars.outputs.rpm_version }}-${{ steps.set_vars.outputs.rpm_release }}"
- name: Prepare Source
run: |
TAR_NAME="bash-tui-${{ env.TAR_VERSION }}.tar.gz"
mkdir -p $HOME/rpmbuild/SOURCES
tar czf $HOME/rpmbuild/SOURCES/$TAR_NAME --exclude=.git .
- name: Build RPM
run: |
rpmbuild -ba bash-tui.spec \
--define "_sourcedir $HOME/rpmbuild/SOURCES" \
--define "tar_version $TAR_VERSION" \
--define "rpm_version $RPM_VERSION" \
--define "rpm_release $RPM_RELEASE" \
--define "_srcrpmdir $HOME" \
--define "_rpmdir $HOME"
- name: Upload RPM
uses: actions/upload-artifact@v2
with:
name: bash-tui
path: |
${HOME}/*.rpm