feat: deb package #1
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: RPM package | |
on: | |
pull_request: | |
jobs: | |
build-rpm-package: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install build dependencies | |
run: sudo apt-get update && sudo apt-get install -y python3 | |
- name: Install protoc | |
uses: actions/setup-python@v2 | |
- run: pip install --upgrade pip poetry | |
- run: poetry install --no-interaction --no-root | |
- run: poetry run python -m grpc_tools.protoc -Iproto --python_out=yubi_bridge --grpc_python_out=yubi_bridge proto/worker/worker.proto | |
- run: sed -i 's/from worker import worker_pb2 as worker_dot_worker__pb2/from . import worker_pb2 as worker_dot_worker__pb2/g' yubi_bridge/worker/worker_pb2_grpc.py | |
- name: Setup rpm package | |
run: poetry run python3 setup.py bdist_rpm | |
- name: Build rpm pacakge | |
run: rpmbuild -ba ./build/bdist.linux-x86_64/rpm/SPECS/yubi-bridge.spec | |
- name: Move artifact | |
run: mv ../yubi-bridge-${{ github.ref_name }}.rpm ./ | |
- name: Upload Debian package artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: yubi-bridge-${{ github.ref_name}}.rpm | |
path: yubi-bridge-${{ github.ref_name}}.rpm | |