Skip to content

Release

Release #8

Workflow file for this run

name: Release
on:
release:
types: ["published"]
jobs:
release:
runs-on: ${{ matrix.platform == 'linux' && 'ubuntu-latest' || matrix.platform == 'windows' && 'ubuntu-latest' || matrix.platform == 'osx' && 'macos-latest' }}
strategy:
matrix:
platform: [linux, windows, osx]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
# Linux
- name: Build binary (linux/windows)
if: matrix.platform == 'linux' || matrix.platform == 'windows'
run: docker run --rm -v "${PWD}:/src/" --env SPECFILE=./schwifty.spec batonogov/pyinstaller-${{ matrix.platform }}
# Macos
- uses: cachix/install-nix-action@v26
if: matrix.platform == 'osx'
- uses: cachix/cachix-action@v14
if: matrix.platform == 'osx'
with:
name: devenv
- name: Install devenv.sh
if: matrix.platform == 'osx'
run: nix profile install nixpkgs#devenv
- name: Build binary (macos)
if: matrix.platform == 'osx'
run: devenv test
# Finalize
- name: Test binary
run: dist/schwifty "DE89370400440532013000"
- name: Compress binary
run: tar -czvf schwifty-${{ matrix.platform }}.tar.gz -C dist/ schwifty
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./schwifty-${{ matrix.platform }}.tar.gz
asset_name: schwifty-${{ matrix.platform }}.tar.gz
asset_content_type: application/gzip