-
Notifications
You must be signed in to change notification settings - Fork 88
66 lines (56 loc) · 2.08 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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/*