1111 ENEMIZER_VERSION : 7.1
1212 APPIMAGETOOL_VERSION : 13
1313
14+ permissions : # permissions required for attestation
15+ id-token : ' write'
16+ attestations : ' write'
17+ contents : ' write' # additionally required for release
18+
1419jobs :
1520 create-release :
1621 runs-on : ubuntu-latest
@@ -26,11 +31,79 @@ jobs:
2631 env :
2732 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2833
29- # build-release-windows: # this is done by hand because of signing
3034 # build-release-macos: # LF volunteer
3135
32- build-release-ubuntu2004 :
33- runs-on : ubuntu-20.04
36+ build-release-win :
37+ runs-on : windows-latest
38+ if : ${{ true }} # change to false to skip if release is built by hand
39+ needs : create-release
40+ steps :
41+ - name : Set env
42+ shell : bash
43+ run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
44+ # - code below copied from build.yml -
45+ - uses : actions/checkout@v4
46+ - name : Install python
47+ uses : actions/setup-python@v5
48+ with :
49+ python-version : ' ~3.12.7'
50+ check-latest : true
51+ - name : Download run-time dependencies
52+ run : |
53+ Invoke-WebRequest -Uri https://github.com/Ijwu/Enemizer/releases/download/${Env:ENEMIZER_VERSION}/win-x64.zip -OutFile enemizer.zip
54+ Expand-Archive -Path enemizer.zip -DestinationPath EnemizerCLI -Force
55+ choco install innosetup --version=6.2.2 --allow-downgrade
56+ - name : Build
57+ run : |
58+ python -m pip install --upgrade pip
59+ python setup.py build_exe --yes
60+ if ( $? -eq $false ) {
61+ Write-Error "setup.py failed!"
62+ exit 1
63+ }
64+ $NAME="$(ls build | Select-String -Pattern 'exe')".Split('.',2)[1]
65+ $ZIP_NAME="Archipelago_$NAME.7z"
66+ echo "$NAME -> $ZIP_NAME"
67+ echo "ZIP_NAME=$ZIP_NAME" >> $Env:GITHUB_ENV
68+ New-Item -Path dist -ItemType Directory -Force
69+ cd build
70+ Rename-Item "exe.$NAME" Archipelago
71+ 7z a -mx=9 -mhe=on -ms "../dist/$ZIP_NAME" Archipelago
72+ Rename-Item Archipelago "exe.$NAME" # inno_setup.iss expects the original name
73+ - name : Build Setup
74+ run : |
75+ & "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" inno_setup.iss /DNO_SIGNTOOL
76+ if ( $? -eq $false ) {
77+ Write-Error "Building setup failed!"
78+ exit 1
79+ }
80+ $contents = Get-ChildItem -Path setups/*.exe -Force -Recurse
81+ $SETUP_NAME=$contents[0].Name
82+ echo "SETUP_NAME=$SETUP_NAME" >> $Env:GITHUB_ENV
83+ # - code above copied from build.yml -
84+ - name : Attest Build
85+ uses : actions/attest-build-provenance@v2
86+ with :
87+ subject-path : |
88+ build/exe.*/ArchipelagoLauncher.exe
89+ build/exe.*/ArchipelagoLauncherDebug.exe
90+ build/exe.*/ArchipelagoGenerate.exe
91+ build/exe.*/ArchipelagoServer.exe
92+ setups/*
93+ - name : Add to Release
94+ uses : softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a
95+ with :
96+ draft : true # see above
97+ prerelease : false
98+ name : Archipelago ${{ env.RELEASE_VERSION }}
99+ files : |
100+ setups/*
101+ env :
102+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
103+
104+ build-release-ubuntu2204 :
105+ runs-on : ubuntu-22.04
106+ needs : create-release
34107 steps :
35108 - name : Set env
36109 run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
@@ -44,10 +117,11 @@ jobs:
44117 - name : Get a recent python
45118 uses : actions/setup-python@v5
46119 with :
47- python-version : ' 3.11'
120+ python-version : ' ~3.12.7'
121+ check-latest : true
48122 - name : Install build-time dependencies
49123 run : |
50- echo "PYTHON=python3.11 " >> $GITHUB_ENV
124+ echo "PYTHON=python3.12 " >> $GITHUB_ENV
51125 wget -nv https://github.com/AppImage/AppImageKit/releases/download/$APPIMAGETOOL_VERSION/appimagetool-x86_64.AppImage
52126 chmod a+rx appimagetool-x86_64.AppImage
53127 ./appimagetool-x86_64.AppImage --appimage-extract
63137 # charset-normalizer was somehow incomplete in the github runner
64138 "${{ env.PYTHON }}" -m venv venv
65139 source venv/bin/activate
66- "${{ env.PYTHON }}" -m pip install --upgrade pip PyGObject charset-normalizer
140+ "${{ env.PYTHON }}" -m pip install --upgrade pip " PyGObject<3.51.0" charset-normalizer
67141 python setup.py build_exe --yes bdist_appimage --yes
68142 echo -e "setup.py build output:\n `ls build`"
69143 echo -e "setup.py dist output:\n `ls dist`"
@@ -73,6 +147,14 @@ jobs:
73147 echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV
74148 echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
75149 # - code above copied from build.yml -
150+ - name : Attest Build
151+ uses : actions/attest-build-provenance@v2
152+ with :
153+ subject-path : |
154+ build/exe.*/ArchipelagoLauncher
155+ build/exe.*/ArchipelagoGenerate
156+ build/exe.*/ArchipelagoServer
157+ dist/*
76158 - name : Add to Release
77159 uses : softprops/action-gh-release@975c1b265e11dd76618af1c374e7981f9a6ff44a
78160 with :
0 commit comments