Skip to content

DisplayKeys-IS Release #17

DisplayKeys-IS Release

DisplayKeys-IS Release #17

Workflow file for this run

####################################################################################################################
# This Action exists solely for the purposes of Releasing a 'Final' State of a Version.
# This action has to be triggered manually once all the parameters in this Action are 'Manuall' setup.
#
# For development purposes check the 'DisplayKeys-IS Main' Action, and its auto generated Artifacts.
####################################################################################################################
name: DisplayKeys-IS Release
# Trigger Build on:
on:
# Manually create release and add artifact after release published
workflow_dispatch:
# Actions project permission
permissions: write-all
jobs:
publish_release:
runs-on: windows-latest
env:
# Release Variables
Release_Title: "DisplayKeys-IS | Patch | v0.3.1"
Release_Body: ${{ github.workspace }}/ProjectFiles/config/releaselog.md
Tag: "v0.3.1"
Artifact_Title: "DisplayKeys-IS_v0.3.1.exe"
# Packaging Command Variables
Application_File_Path: ${{ github.workspace }}/ProjectFiles/DisplayKeys-IS.py
Application_Title: "DisplayKeys-IS"
Application_Icon_Path: ${{ github.workspace }}/ProjectFiles/assets/DisplayKeys-IS.ico
Artifact_Save_Dir: ${{ github.workspace }}/ProjectFiles/dist/
Full_Artifact_Save_Path: "${{ github.workspace }}/ProjectFiles/dist/DisplayKeys-IS.exe"
Packaging_Add_Icon: "${{ github.workspace }}/ProjectFiles/assets/DisplayKeys-IS.ico;."
Packaging_Add_Preview: "${{ github.workspace }}/ProjectFiles/assets/Preview.png;."
Packaging_Add_Versioning: ${{ github.workspace }}/ProjectFiles/config/version.txt
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: $env:Release_Title
tag_name: ${{ env.Tag }}
body_path: ${{ env.Release_Body }}
env:
GITHUB_TOKEN: ${{ github.token }}
############## Create Artifact ##############
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r ${{ github.workspace }}/ProjectFiles/config/requirements.txt
- name: Create EXE file
run: |
# Command parameters for creating the .EXE file
pyinstaller $env:Application_File_Path --onefile --noconsole --debug all --name $env:Application_Title --distpath $env:Artifact_Save_Dir --icon $env:Application_Icon_Path --add-data $env:Packaging_Add_Icon --add-data $env:Packaging_Add_Preview --version-file $env:Packaging_Add_Versioning
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: DisplayKeys-IS
path: ${{ env.Full_Artifact_Save_Path }}
############## Upload Artifact ##############
- name: get artifact
uses: actions/download-artifact@v2
with:
name: DisplayKeys-IS
path: ${{ env.Artifact_Save_Dir }}
- name: upload windows artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.Full_Artifact_Save_Path }}
asset_name: $env:Artifact_Title
asset_content_type: application/vnd.microsoft.portable-executable