Release #10
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release Version' | |
required: true | |
jobs: | |
release: | |
environment: deploy | |
runs-on: windows-latest | |
env: | |
UID_VERSION: v4.0.6 | |
ICE_ADAPTER_VERSION: 3.3.9 | |
BUILD_VERSION: ${{ github.event.inputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: pip | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: Download ICE adapter and UID calculator | |
run: | | |
mkdir build_setup\ice-adapter | |
Invoke-WebRequest -Uri "https://github.com/FAForever/uid/releases/download/$($env:UID_VERSION)/faf-uid.exe" -OutFile ".\\build_setup\\faf-uid.exe" | |
Invoke-WebRequest -Uri "https://content.faforever.com/build/jre/windows-amd64-21.0.1.tar.gz" -OutFile ".\\windows-amd64-15.0.1.tar.gz" | |
7z x windows-amd64-15.0.1.tar.gz | |
7z x windows-amd64-15.0.1.tar -obuild_setup/ice-adapter/jre | |
Invoke-WebRequest -Uri "https://github.com/FAForever/java-ice-adapter/releases/download/$($env:ICE_ADAPTER_VERSION)/faf-ice-adapter-$($env:ICE_ADAPTER_VERSION)-win.jar" -OutFile ".\\build_setup\\ice-adapter\\faf-ice-adapter.jar" | |
- name: Test with pytest | |
run: | | |
python runtests.py -vv --full-trace | |
- name: Build application | |
run: | | |
python setup.py bdist_msi | |
- name: Calculate checksum | |
id: checksum | |
run: | | |
$MSI_SUM = $(Get-FileHash dist/*).hash | |
Write-Host $MSI_SUM | |
echo "MSI_SUM=$MSI_SUM" >> "$env:GITHUB_ENV" | |
- name: Create draft release | |
id: create_release | |
uses: ncipollo/[email protected] | |
with: | |
commit: ${{ github.sha }} | |
tag: ${{ github.event.inputs.version }} | |
body: "SHA256: ${{ env.MSI_SUM }}" | |
draft: true | |
prerelease: true | |
artifacts: dist/* |