Skip to content

initial version 1.0.0.0 #1

initial version 1.0.0.0

initial version 1.0.0.0 #1

Workflow file for this run

name: Build and release
on:
push:
tags:
- "v*.*.*.*"
jobs:
build:
name: Build exe
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['windows-latest']
steps:
- uses: actions/checkout@v3
- name: Remove 'v' prefix
id: remove_prefix
run: |
$tag = "${{ github.ref_name }}"
$modifiedTag = $tag -replace '^v', ''
echo "::set-output name=tag_name::$modifiedTag"
- name: Display modified tag name
run: |
echo "Modified tag name: ${{ steps.remove_prefix.outputs.tag_name }}"
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- run: pip install pyinstaller setuptools wheel Pillow pyinstaller-versionfile
- run: pip install -r src/requirements.txt
- run: create-version-file src/metadata.yml --outfile file_version_info.txt --version ${{ steps.remove_prefix.outputs.tag_name }}
- run: python3 src/generate_example_dfs.py resources/Daten.xlsx
- run: pyinstaller --noconfirm --onefile --windowed --icon "src/icons/icon.ico" --name "DLRG Briefbogen Generator" --add-data "src/icons;icons/" --add-data "src/pkl;pkl/" --version-file="file_version_info.txt" --splash "resources/splash.png" "src/app.py"
- name: Upload exe
uses: actions/upload-artifact@v3
with:
name: DLRG Briefbogen Generator
path: dist/*
if-no-files-found: error
release:
if: startsWith(github.event.ref, 'refs/tags/v')
needs: build
name: Create release with assets
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Templates
uses: actions/checkout@v3
- run: zip -j Briefbogen_Templates.zip Briefbogen_Templates/*
- name: Artifact
uses: actions/download-artifact@v3
with:
name: "DLRG Briefbogen Generator"
path: dist
- run: zip -j DLRG_Briefbogen_Generator.zip dist/*
- name: Create release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
artifacts: DLRG_Briefbogen_Generator.zip, Briefbogen_Templates.zip