Skip to content

Copy example settings to binaries #20

Copy example settings to binaries

Copy example settings to binaries #20

Workflow file for this run

name: "Build and publish binaries"
permissions:
contents: write
on:
push:
tags:
- '*'
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
build:
name: Build Release
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'ubuntu-latest', 'macos-latest']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- run: pip install pyinstaller pillow
- run: pyinstaller -w -F --distpath ./dist/${{ runner.os }} -i src/icon.icns src/FarmUpload.py
- run: |
cp settings-example.json dist/${{ runner.os }}/
zip -r FarmUpload-${{ runner.os }}.zip dist/${{ runner.os }}/*
if: matrix.os == 'ubuntu-latest'
- run: |
cp settings-example.json dist/${{ runner.os }}/
zip -r FarmUpload-${{ runner.os }}.zip dist/${{ runner.os }}/*
if: matrix.os == 'macos-latest'
- run: |
copy settings-example.json dist/${{ runner.os }}/
powershell Compress-Archive -Path dist -DestinationPath FarmUpload-${{ runner.os }}.zip
if: matrix.os == 'windows-latest'
- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.create_release.outputs.tag-name }}
files: FarmUpload-${{ runner.os }}.zip