Skip to content

(Discord RPC) Run callbacks on Dispose #115

(Discord RPC) Run callbacks on Dispose

(Discord RPC) Run callbacks on Dispose #115

Workflow file for this run

# Credits to @Scighost from Starward for his contributions!
name: Build-Canary
#run-name: Canary Build for ${{ github.ref }}
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'net-8'
pull_request:
branches-ignore:
- 'translations_**'
# schedule:
# - cron: '0 0 * * 0' # At 00:00 on Sunday
jobs:
build:
# runs-on: [self-hosted, linux]
runs-on: windows-latest
strategy:
matrix:
configuration: [Release] # No need to distribute Debug builds
platform: [x64]
framework: [net8.0-windows10.0.22621.0]
env:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
DOTNET_INSTALL_DIR: '.\.dotnet'
DOTNET_VERSION: '8.0'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Cache dotnet # cache dotnet install https://stackoverflow.com/questions/75180149/how-to-cache-dotnet-installation-in-github-actions
id: cache-dotnet
uses: actions/cache@v3
with:
path: ${{ env.DOTNET_INSTALL_DIR }}
key: ${{ runner.os }}-dotnet-${{ env.DOTNET_VERSION }}-${{ matrix.platform }}
restore-keys: ${{ runner.os }}-dotnet-${{ env.DOTNET_VERSION }}-${{ matrix.platform }}
- name: Cache nuget # cache nuget https://github.com/actions/cache/blob/main/examples.md#c---nuget
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup MSBuild
uses: microsoft/[email protected]
with:
vs-prerelease: true
msbuild-architecture: ${{ matrix.platform }}
- name: Restore
run: dotnet restore CollapseLauncher
- name: Build
run: |
dotnet publish CollapseLauncher -p:PublishProfile=Publish-PreviewRelease -p:PublishDir=".\preview-build\"
# - name: Upload Artifact (Debug)
# uses: actions/[email protected]
# if: ${{ matrix.configuration == 'Debug' }}
# with:
# name: collapse_debug_${{ github.ref }}_${{ steps.vars.outputs.sha_short }}.${{ matrix.platform }}-${{ matrix.configuration }}
# path: ./CollapseLauncher/bin/x64/Debug/${{ matrix.framework }}/
- name: Upload Artifact (Release)
uses: actions/[email protected]
if: ${{ matrix.configuration == 'Release' }}
with:
name: collapse_${{ matrix.platform }}-${{ matrix.configuration }}_${{ matrix.framework }}_${{ github.sha }}
path: ./CollapseLauncher/preview-build/
- name: Notify Discord
uses: sarisia/[email protected]
if: always()
continue-on-error: true
with:
webhook: ${{ secrets.DISCORD_WEBHOOK_NIGHTLY }}
title: New canary build is ready!
status: ${{ job.status }}
description: |
WARNING! THIS IS NET 8 TEST BUILD. STABILITY MAY SUFFER!
Commit `${{ github.sha }}` by ${{ github.actor }}
Click [here](https://nightly.link/CollapseLauncher/Collapse/actions/runs/${{ github.run_id }}) to download!