Update and rename emulator-request.md to feature-request.md #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: troppical-build | |
on: | |
push: | |
branches: [ "*" ] | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
branches: [ master ] | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'Create Release' | |
required: true | |
type: boolean | |
default: false | |
jobs: | |
Windows-build: | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~\AppData\Local\pip\Cache | |
~\AppData\Local\pyinstaller\Cache | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
pip install --cache-dir=~/.pip-cache -r requirements.txt | |
- name: Build | |
shell: bash | |
run: | | |
pyinstaller Troppical.spec | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: troppical-windows | |
path: | | |
${{ github.workspace }}/dist/Troppical.exe | |
create-release: | |
needs: [Windows-build] | |
if: github.event.inputs.release == 'true' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Create artifacts directory | |
run: mkdir -p artifacts | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: troppical-windows | |
path: artifacts | |
- name: List files | |
run: ls -R artifacts/ | |
- name: Get version | |
id: version | |
run: | | |
VERSION=$(cat artifacts/version.txt) | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.BUILD }} | |
with: | |
tag_name: ${{ steps.version.outputs.version }} | |
release_name: Troppical ${{ steps.version.outputs.version }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.BUILD }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: artifacts/dist/Troppical.exe | |
asset_name: Troppical.exe | |
asset_content_type: application/octet-stream |