Skip to content

Tell users to contact support when EFS needs to be reformatted #58

Tell users to contact support when EFS needs to be reformatted

Tell users to contact support when EFS needs to be reformatted #58

Workflow file for this run

# Copyright Nitrokey GmbH
# SPDX-License-Identifier: Apache-2.0 OR MIT
name: Continuous delivery - Linux
on:
push:
pull_request:
release:
types: [published]
env:
FLIT_ROOT_INSTALL: 1
jobs:
version-check:
name: Check versioning
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check version tag format
run: |
TAG_VERSION="${{ github.event.release.tag_name }}"
if [[ $TAG_VERSION =~ ^v[0-9]+.[0-9]+.[0-9]+(-(rc|post)\.[1-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
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install required packages
run: |
apt update
apt install -y binutils gcc git libpcsclite-dev libusb-1.0-0 make swig git
- 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@v4
with:
name: nitropy-onefile
path: dist/nitropy
publish-binary:
name: Publish binary
runs-on: ubuntu-latest
container: python:3.9-slim
needs: [build-onefile, version-check]
if: github.event_name == 'release'
permissions:
contents: write
steps:
- name: Download artifact
uses: actions/download-artifact@v4
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@v2
with:
files: nitropy-${{ github.event.release.tag_name }}-x64-linux-binary.tar.gz