Skip to content

v0.4.42

v0.4.42 #7

Workflow file for this run

name: Continuous delivery - Linux
on:
release:
types: [prereleased, released]
env:
FLIT_ROOT_INSTALL: 1
jobs:
version-check:
name: Check versioning
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check version tag format
run: |
TAG_VERSION="${{ github.event.release.tag_name }}"
if [[ $TAG_VERSION =~ ^v[0-9]+.[0-9]+.[0-9]+$ ]]; then exit 0; else exit 1; fi
- name: Check if version tag and package version are equal
run: |
TAG_VERSION="${{ github.event.release.tag_name }}"
if [ ${TAG_VERSION:1} == $(cat pynitrokey/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@v3
- name: Install required packages
run: |
apt update
apt install -y binutils gcc libpcsclite-dev libusb-1.0-0 make swig
- name: Create virtual environment
run: |
python -m venv venv
. venv/bin/activate
pip install flit
flit install --symlink
- name: Build
run: |
. venv/bin/activate
pyinstaller \
ci-scripts/linux/pyinstaller/pynitrokey-onefile.spec
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: nitropy-onefile
path: dist/nitropy
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@v3
with:
name: nitropy-onefile
- name: Rename binary
run: |
mv \
nitropy \
nitropy-${{ github.event.release.tag_name }}-x64-linux-binary
- name: Create archive
run: |
tar \
-czvf \
nitropy-${{ github.event.release.tag_name }}-x64-linux-binary.tar.gz \
nitropy-${{ github.event.release.tag_name }}-x64-linux-binary
- name: Publish release
uses: softprops/action-gh-release@v1
with:
files: nitropy-${{ github.event.release.tag_name }}-x64-linux-binary.tar.gz