v2.3.3 #32
Workflow file for this run
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: Continuous delivery - Linux | |
on: | |
release: | |
types: [prereleased, released] | |
jobs: | |
version-check: | |
name: Check versioning | |
runs-on: ubuntu-latest | |
container: python:3.9-slim | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install required packages | |
run: | | |
apt update | |
apt install -y python3-poetry | |
- name: Create virtual environment | |
run: make init | |
- name: Check version tag format | |
shell: bash | |
run: | | |
VERSION_TAG="${{ github.event.release.tag_name }}" | |
if [[ $VERSION_TAG =~ ^v[0-9]+.[0-9]+.[0-9]+$ ]]; then exit 0; else exit 1; fi | |
- name: Check if version tag and package version are equal | |
shell: bash | |
run: | | |
VERSION_TAG="${{ github.event.release.tag_name }}" | |
PACKAGE_VERSION="v"$($(poetry env info --path)/bin/python -c "from nitrokeyapp import __version__; print(__version__)") | |
if [ $VERSION_TAG == $PACKAGE_VERSION ]; then exit 0; else exit 1; fi | |
build-onefile: | |
name: Build onefile | |
runs-on: ubuntu-latest | |
container: python:3.9-slim | |
needs: version-check | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install required packages | |
run: | | |
apt update | |
apt install -y binutils \ | |
libglib2.0-dev \ | |
libgl-dev \ | |
libegl-dev \ | |
libxkbcommon-x11-dev \ | |
libxcb-cursor-dev \ | |
libxcb-icccm4-dev \ | |
libxcb-image0-dev \ | |
libxcb-keysyms1-dev \ | |
libxcb-render-util0-dev \ | |
libxcb-shape0-dev \ | |
libxcb-xkb-dev \ | |
libdbus-1-dev \ | |
libwayland-dev \ | |
libgtk-3-dev \ | |
libatk1.0-dev \ | |
libpangocairo-1.0-0 \ | |
libpango1.0-dev \ | |
make \ | |
python3-poetry | |
- name: Create virtual environment | |
run: | | |
poetry env use python3.9 | |
poetry install | |
- name: Build | |
run: make build-pyinstaller-onefile | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nitrokey-app-onefile | |
path: dist/nitrokey-app | |
publish-binary: | |
name: Publish binary | |
runs-on: ubuntu-latest | |
container: python:3.9-slim | |
needs: build-onefile | |
permissions: | |
contents: write | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: nitrokey-app-onefile | |
- name: Rename binary | |
run: | | |
mv \ | |
nitrokey-app \ | |
nitrokey-app-${{ github.event.release.tag_name }}-x64-linux-binary | |
- name: Publish release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: nitrokey-app-${{ github.event.release.tag_name }}-x64-linux-binary |