mirror of
https://github.com/Syping/dtranslatebot.git
synced 2024-12-22 11:55:30 +01:00
CI: add Enterprise Linux
This commit is contained in:
parent
9380dd14ea
commit
7d8bbd12ce
1 changed files with 37 additions and 0 deletions
37
.github/workflows/el.yml
vendored
Normal file
37
.github/workflows/el.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Enterprise Linux
|
||||
on: push
|
||||
jobs:
|
||||
Release:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
version: [el7, el8, el9]
|
||||
steps:
|
||||
- name: Cloning
|
||||
uses: actions/checkout@v4
|
||||
- name: Preparing
|
||||
run: mkdir -m 777 ${{github.workspace}}/rpms
|
||||
- name: Build RPM
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: docker.io/syping/dtranslatebot-build:${{matrix.version}}
|
||||
options: -v ${{github.workspace}}:/home/rpmbuild/dtranslatebot -v ${{github.workspace}}/rpms:/home/rpmbuild/rpmbuild/RPMS
|
||||
run: |
|
||||
VERSION=$(cat dtranslatebot/CMakeLists.txt | grep -oP "project\(dtranslatebot VERSION \K(\S*)(?= LANGUAGES CXX\))")
|
||||
mkdir -p dtranslatebot-$VERSION
|
||||
shopt -s extglob
|
||||
cp -R dtranslatebot/!(rpms|rpmsrc) \
|
||||
dtranslatebot-$VERSION
|
||||
tar cfz dtranslatebot-$VERSION.tar.gz dtranslatebot-$VERSION
|
||||
cp dtranslatebot-$VERSION.tar.gz \
|
||||
dtranslatebot/rpmsrc/!(*.spec) \
|
||||
rpmbuild/SOURCES
|
||||
cp dtranslatebot/rpmsrc/*.spec \
|
||||
rpmbuild/SPECS
|
||||
rpmbuild -ba rpmbuild/SPECS/dtranslatebot.spec
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Enterprise Linux ${{matrix.version}}
|
||||
path: |
|
||||
${{github.workspace}}/rpms/x86_64/*.rpm
|
Loading…
Reference in a new issue