Skip to content

build: CelesteTAS v3.44.1, Studio v3.9.1 #40

build: CelesteTAS v3.44.1, Studio v3.9.1

build: CelesteTAS v3.44.1, Studio v3.9.1 #40

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
generate-changelog:
name: Generate Changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.12.6
- name: Setup Python environment
run: |
python -m venv .venv
source .venv/bin/activate
pip install requests
- name: Generate changelog
run: |
source .venv/bin/activate
python Scripts/generate_changelog.py "$(git log -1 --pretty=%B)" CHANGELOG.md version_info.txt gamebanana_changelog.json github_changelog.md studio_changelog.json
env:
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
- name: Upload version information
uses: actions/upload-artifact@v4
with:
name: changelog-version
path: version_info.txt
- name: Upload GameBanana changelog
uses: actions/upload-artifact@v4
with:
name: changelog-gamebanana
path: gamebanana_changelog.json
- name: Upload GitHub changelog
uses: actions/upload-artifact@v4
with:
name: changelog-github
path: github_changelog.md
- name: Upload Studio changelog
uses: actions/upload-artifact@v4
with:
name: changelog-studio
path: studio_changelog.json
build-studio:
name: Release Celeste Studio
uses: ./.github/workflows/Build.CelesteStudio.yml
with:
build-cfg: Release
build-sync-checker:
uses: ./.github/workflows/Build.SyncChecker.yml
with:
build-cfg: Release
run-sync-check:
name: Run Sync-Check
uses: ./.github/workflows/Test.All.yml
needs: build-sync-checker
release:
name: Release CelesteTAS
runs-on: ubuntu-latest
needs:
- build-studio
- build-sync-checker
- run-sync-check
- generate-changelog
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0'
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.12.6
- name: Setup Firefox WebDriver
uses: browser-actions/setup-firefox@v1
- name: Download Studio builds
uses: actions/download-artifact@v4
with:
pattern: CelesteStudio-*
- name: Move Studio builds into correct location
run: |
mv CelesteStudio-windows-x64/CelesteStudio-windows-x64.zip .
mv CelesteStudio-linux-x64/CelesteStudio-linux-x64.zip .
mv CelesteStudio-macos-x64/CelesteStudio-macos-x64.zip .
mv CelesteStudio-macos-arm64/CelesteStudio-macos-arm64.zip .
- name: Cache Windows build
if: ${{ needs.build-studio.outputs.windows_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: CelesteStudio-windows-x64.zip
key: ${{ needs.build-studio.outputs.windows_cache_key }}
- name: Cache Linux build
if: ${{ needs.build-studio.outputs.linux_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: CelesteStudio-linux-x64.zip
key: ${{ needs.build-studio.outputs.linux_cache_key }}
- name: Cache macOS build
if: ${{ needs.build-studio.outputs.macos_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: |
CelesteStudio-macos-x64.zip
CelesteStudio-macos-arm64.zip
key: ${{ needs.build-studio.outputs.macos_cache_key }}
- name: Download SyncChecker builds
uses: actions/download-artifact@v4
with:
pattern: SyncChecker
- name: Generate SyncChecker archive
run: |
pushd SyncChecker
zip ../SyncChecker.zip **
popd
- name: Download changelogs
uses: actions/download-artifact@v4
with:
pattern: changelog-*
- name: Copy Studio changelog into correct location
run: |
cp changelog-studio/studio_changelog.json Assets/version_history.json
cp changelog-version/version_info.txt Assets/current_version.txt
- name: Fill-in download info
run: |
sed -i "s\\false; //DOUBLE_ZIP_ARCHIVE\\false;\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##STUDIO_VERSION##\\$(perl -nle 'print $1 if /<Version>(\S+)<\/Version>/' Studio/CelesteStudio/CelesteStudio.csproj)\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##URL_WINDOWS_x64##\\https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/CelesteStudio-windows-x64.zip\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##URL_LINUX_x64##\\https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/CelesteStudio-linux-x64.zip\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##URL_MACOS_x64##\\https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/CelesteStudio-macos-x64.zip\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##URL_MACOS_ARM64##\\https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/CelesteStudio-macos-arm64.zip\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##FILENAME_WINDOWS_x64##\\CelesteStudio-windows-x64.zip\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##FILENAME_LINUX_x64##\\CelesteStudio-linux-x64.zip\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##FILENAME_MACOS_x64##\\CelesteStudio-macos-x64.zip\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##FILENAME_MACOS_ARM64##\\CelesteStudio-macos-arm64.zip\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##CHECKSUM_WINDOWS_x64##\\$(md5sum CelesteStudio-windows-x64.zip | head -c 32)\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##CHECKSUM_LINUX_x64##\\$(md5sum CelesteStudio-linux-x64.zip | head -c 32)\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##CHECKSUM_MACOS_x64##\\$(md5sum CelesteStudio-macos-x64.zip | head -c 32)\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
sed -i "s\\##CHECKSUM_MACOS_ARM64##\\$(md5sum CelesteStudio-macos-arm64.zip | head -c 32)\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
cat CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
- name: Build
run: |
dotnet build CelesteTAS-EverestInterop -c Release -p:DefineConstants=INSTALL_STUDIO -p:UseSymlinks=false
- name: Setup Python environment
run: |
python -m venv .venv
source .venv/bin/activate
pip install requests selenium
- name: Prepare releases
run: |
# Version GameBanana .zip without v prefix
RELEASE_FILE="CelesteTAS_$(sed -n "1p" changelog-version/version_info.txt).zip"
cp CelesteTAS.zip $RELEASE_FILE
echo "RELEASE_FILE=$RELEASE_FILE" >> $GITHUB_ENV
# Setup GitHub release title
RELEASE_TITLE="v$(sed -n "1p" changelog-version/version_info.txt) (Studio v$(sed -n "2p" changelog-version/version_info.txt))"
echo "RELEASE_TITLE=$RELEASE_TITLE" >> $GITHUB_ENV
- name: Upload GameBanana release
run: |
source .venv/bin/activate
python Scripts/gamebanana_upload.py ${{ env.RELEASE_FILE }} changelog-gamebanana/gamebanana_changelog.json changelog-version/version_info.txt
env:
GAMEBANANA_USERNAME: AutomaticRelease
GAMEBANANA_PASSWORD: ${{ secrets.GAMEBANANA_PASSWORD }}
GAMEBANANA_2FA_URI: ${{ secrets.GAMEBANANA_2FA_URI }}
GAMEBANANA_MODID: 6715
GAMEBANANA_ISTOOL: 1
- name: Upload GitHub release
uses: softprops/action-gh-release@v1
with:
name: ${{ env.RELEASE_TITLE }}
body_path: changelog-github/github_changelog.md
files: |
CelesteTAS.zip
CelesteStudio-windows-x64.zip
CelesteStudio-linux-x64.zip
CelesteStudio-macos-x64.zip
CelesteStudio-macos-arm64.zip
SyncChecker.zip
- name: Clean-up changelog artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: changelog-*
failOnError: false