Update workflows
This commit is contained in:
parent
05a8d2ac1c
commit
73a7492804
3 changed files with 3 additions and 80 deletions
2
.github/workflows/build-cmake.yml
vendored
2
.github/workflows/build-cmake.yml
vendored
|
@ -8,7 +8,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
fedora-cmake-build:
|
fedora-cmake-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: fedora:34
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: install tools and dependencies
|
- name: install tools and dependencies
|
||||||
|
|
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
|
@ -8,7 +8,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
fedora-rpm-build:
|
fedora-rpm-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: fedora:34
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: install tools and dependencies
|
- name: install tools and dependencies
|
||||||
|
@ -18,16 +18,3 @@ jobs:
|
||||||
- name: build mouse_m908 rpm package
|
- name: build mouse_m908 rpm package
|
||||||
run: |
|
run: |
|
||||||
make -j4 rpm
|
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
|
|
||||||
|
|
66
.github/workflows/release.yml
vendored
66
.github/workflows/release.yml
vendored
|
@ -29,7 +29,7 @@ jobs:
|
||||||
|
|
||||||
fedora-release-rpm:
|
fedora-release-rpm:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: fedora:34
|
container: fedora:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: get version details
|
- name: get version details
|
||||||
|
@ -89,67 +89,3 @@ jobs:
|
||||||
asset_path: ./${{ env.SRPM_NAME }}
|
asset_path: ./${{ env.SRPM_NAME }}
|
||||||
asset_name: ${{ env.SRPM_NAME }}
|
asset_name: ${{ env.SRPM_NAME }}
|
||||||
asset_content_type: application/octet-stream
|
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
|
|
||||||
|
|
Loading…
Reference in a new issue