mirror of
https://github.com/SK8-ENGINE/skate-3-rust-engine.git
synced 2026-10-26 19:47:44 +00:00
Publish rolling Experimental builds from main and support updater discovery
This commit is contained in:
1 parent
cba8993325
commit
3ea9b4aa51
7 files changed
+290
-34
No files matched your search
@@ -1,39 +1,72 @@
|
||||
name: Windows release
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
jobs:
|
||||
windows:
|
||||
if: github.event_name != 'release' || github.event.release.tag_name != 'experimental'
|
||||
runs-on: windows-2025
|
||||
timeout-minutes: 90
|
||||
concurrency:
|
||||
group: windows-build-${{ github.event_name == 'release' && github.event.release.tag_name || github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- name: Install setup packager
|
||||
run: python -m pip install pyinstaller==6.19.0 numpy==2.2.6 Pillow==11.3.0
|
||||
- name: Check updater without starting game
|
||||
cache: pip
|
||||
cache-dependency-path: tools/requirements-setup.txt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: windows-release
|
||||
cache-on-failure: true
|
||||
- name: Check updater and publisher without starting game
|
||||
run: python -m unittest discover -s tools -p "test_*release*.py" -v
|
||||
- name: Check updater protocol
|
||||
run: python -m unittest discover -s tools -p test_updater.py -v
|
||||
- name: Build Windows package
|
||||
shell: pwsh
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
||||
RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || 'experimental' }}
|
||||
run: ./scripts/Build-Release.ps1
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: skate3rust-windows-x64
|
||||
retention-days: 7
|
||||
path: |
|
||||
target/skate3rust-windows-x64.zip
|
||||
target/skate3rust-windows-x64.zip.sha256
|
||||
target/release.json
|
||||
- name: Attach to release
|
||||
publish:
|
||||
needs: windows
|
||||
if: github.event_name == 'release' || github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
concurrency:
|
||||
group: windows-release-publish
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: skate3rust-windows-x64
|
||||
path: target
|
||||
- name: Publish rolling experimental
|
||||
if: github.event_name != 'release'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: python tools/publish_experimental.py --directory target
|
||||
- name: Attach numbered release
|
||||
if: github.event_name == 'release'
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
||||
run: gh release upload "$env:RELEASE_TAG" target/skate3rust-windows-x64.zip target/skate3rust-windows-x64.zip.sha256 target/release.json --clobber
|
||||
run: gh release upload "$RELEASE_TAG" target/skate3rust-windows-x64.zip target/skate3rust-windows-x64.zip.sha256 target/release.json --clobber
|
||||
Reference in new issue
Block a user