This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
change centos8 to rockylinux8 #4
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: Build RPM and add them to a release | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-rpms: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: create tarball | |
shell: bash | |
run: | | |
version="$(grep Version jobinfo.spec | awk '{print $2}')" | |
mkdir SOURCES | |
mkdir SPECS | |
cp jobinfo.spec SPECS | |
mkdir jobinfo-${version} | |
cp jobinfo pynumparser.py jobinfo-${version} | |
tar -czf SOURCES/jobinfo-${version}.tar.gz jobinfo-${version} | |
- name: rpmbuild centos7 | |
uses: ./.github/actions/rpmbuild-centos7/ | |
- name: upload rpm package as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: RPM package | |
path: ${{ github.workspace }}/noarch/jobinfo*.rpm | |
- name: rpmbuild rockylinux8 | |
uses: ./.github/actions/rpmbuild-rockylinux8/ | |
- name: upload rpm package as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: RPM package | |
path: ${{ github.workspace }}/noarch/jobinfo*.rpm | |
create-release: | |
needs: [build-rpms] | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: find release version in tag | |
id: find_version | |
run: | | |
echo ::set-output name=version::${GITHUB_REF#refs/tags/} | |
- name: download RPM packages | |
uses: actions/download-artifact@v2 | |
with: | |
name: RPM package | |
path: ./build_artifacts | |
- name: find filenames of downloaded packages | |
id: find_filenames | |
shell: bash | |
run: | | |
ls -1 -R . | |
echo ::set-output name=package_filenames::$(find ./build_artifacts -name jobinfo*.rpm) | |
- uses: meeDamian/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.find_version.outputs.version }} | |
name: slurm-jobinfo ${{ steps.find_version.outputs.version }} | |
body: > | |
slurm-jobinfo release ${{ steps.find_version.outputs.version }} | |
files: ${{ steps.find_filenames.outputs.package_filenames }} | |
gzip: false |