Update workflows

This commit is contained in:
dokutan 2022-06-21 23:00:19 +02:00
parent 05a8d2ac1c
commit 73a7492804
3 changed files with 3 additions and 80 deletions

View file

@ -8,7 +8,7 @@ on:
jobs:
fedora-cmake-build:
runs-on: ubuntu-latest
container: fedora:34
container: fedora:latest
steps:
- uses: actions/checkout@v2
- name: install tools and dependencies

View file

@ -8,7 +8,7 @@ on:
jobs:
fedora-rpm-build:
runs-on: ubuntu-latest
container: fedora:34
container: fedora:latest
steps:
- uses: actions/checkout@v2
- name: install tools and dependencies
@ -18,16 +18,3 @@ jobs:
- name: build mouse_m908 rpm package
run: |
make -j4 rpm
centos-rpm-build:
runs-on: ubuntu-latest
container: centos:8
steps:
- uses: actions/checkout@v2
- name: install tools and dependencies
run: |
dnf install -y rpm-build findutils clang-tools-extra 'dnf-command(builddep)' 'dnf-command(config-manager)'
dnf config-manager --set-enabled powertools
dnf builddep -y mouse_m908.spec
- name: build mouse_m908 rpm package
run: |
make -j4 rpm

View file

@ -29,7 +29,7 @@ jobs:
fedora-release-rpm:
runs-on: ubuntu-latest
container: fedora:34
container: fedora:latest
steps:
- uses: actions/checkout@v2
- name: get version details
@ -89,67 +89,3 @@ jobs:
asset_path: ./${{ env.SRPM_NAME }}
asset_name: ${{ env.SRPM_NAME }}
asset_content_type: application/octet-stream
centos-release-rpm:
runs-on: ubuntu-latest
container: centos:8
steps:
- uses: actions/checkout@v2
- name: get version details
run: |
echo "RELEASE_VER=${GITHUB_REF#*/*/v}" >> ${GITHUB_ENV}
echo "DIST_TAG=$(rpm --eval '%dist')" >> ${GITHUB_ENV}
echo "RPM_RELEASE=$(awk '/Release:/{$0 = $2; FS="%"; $0=$0; print $1}' mouse_m908.spec)" >> ${GITHUB_ENV}
- name: set output variables
run: |
echo "RPM_NAME=mouse_m908-${RELEASE_VER}-${RPM_RELEASE}${DIST_TAG}.x86_64.rpm" >> ${GITHUB_ENV}
echo "SRPM_NAME=mouse_m908-${RELEASE_VER}-${RPM_RELEASE}${DIST_TAG}.src.rpm" >> ${GITHUB_ENV}
- name: install tools and dependencies
run: |
dnf install -y rpm-build findutils clang-tools-extra 'dnf-command(builddep)' 'dnf-command(config-manager)'
dnf config-manager --set-enabled powertools
dnf builddep -y mouse_m908.spec
- name: build mouse_m908 rpm package
run: |
make -j4 rpm
make -j4 src-rpm
- name: upload rpm package artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.RPM_NAME }}
path: ${{ env.RPM_NAME }}
- name: upload src rpm package artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.SRPM_NAME }}
path: ${{ env.SRPM_NAME }}
- name: download release-upload-url artifact
uses: actions/download-artifact@v2
with:
name: release-upload-url
path: release-upload-url
- name: set upload url environment var
run: |
echo "UPLOAD_URL=$(cat release-upload-url/release-upload-url)" >> ${GITHUB_ENV}
- name: upload rpm package to release page
id: upload-release-rpm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./${{ env.RPM_NAME }}
asset_name: ${{ env.RPM_NAME }}
asset_content_type: application/octet-stream
- name: upload src rpm package to release page
id: upload-release-srpm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./${{ env.SRPM_NAME }}
asset_name: ${{ env.SRPM_NAME }}
asset_content_type: application/octet-stream