add vpk release workflow
This commit is contained in:
50
.github/workflows/build.yml
vendored
50
.github/workflows/build.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- run: dotnet restore CringeLauncher/CringeLauncher.csproj --locked-mode
|
||||
- run: dotnet restore CringeBootstrap/CringeBootstrap.csproj --locked-mode -r win-x64
|
||||
name: Restore Project
|
||||
|
||||
- name: Git Version
|
||||
@@ -29,22 +29,40 @@ jobs:
|
||||
major_pattern: 'breaking:'
|
||||
minor_pattern: 'feature:'
|
||||
|
||||
- run: dotnet publish -c Release -o ./pub CringeLauncher/CringeLauncher.csproj --no-restore -p:Version="${{ steps.version.outputs.version }}" -r win-x64 --no-self-contained
|
||||
- run: dotnet publish -c Release -o ./pub CringeBootstrap/CringeBootstrap.csproj --no-restore -p:Version="${{ steps.version.outputs.version }}" -r win-x64 --no-self-contained
|
||||
id: publish
|
||||
name: Build Project
|
||||
|
||||
- run: dotnet tool install -g vpk
|
||||
|
||||
- run: rm ./pub/CringeLauncher.deps.json
|
||||
|
||||
- run: zip -qq -r ../pub.zip ./
|
||||
working-directory: ./pub
|
||||
name: Zip Results
|
||||
|
||||
- name: Create Release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
- run: ~/.dotnet/tools/vpk download s3
|
||||
name: Download previous release
|
||||
env:
|
||||
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
||||
with:
|
||||
tag_name: ${{ steps.version.outputs.version }}
|
||||
name: Launcher Release ${{ steps.version.outputs.version }}
|
||||
files: |-
|
||||
./pub.zip
|
||||
VPK_KEY_ID: ${{ secrets.S3_KEY_ID }}
|
||||
VPK_SECRET: ${{ secrets.S3_SECRET }}
|
||||
VPK_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
|
||||
VPK_BUCKET: ${{ secrets.S3_BUCKET }}
|
||||
VPK_PREFIX: CringeLauncher
|
||||
|
||||
- run: ~/.dotnet/tools/vpk [win] pack
|
||||
name: Pack Project
|
||||
env:
|
||||
VPK_RUNTIME: win-x64
|
||||
VPK_PACK_ID: CringeLauncher
|
||||
VPK_PACK_VERSION: ${{ steps.version.outputs.version }}
|
||||
VPK_PACK_AUTHORS: zznty
|
||||
VPK_PACK_TITLE: SE Cringe Launcher
|
||||
VPK_PACK_DIR: ./pub
|
||||
VPK_MAIN_EXE: CringeBootstrap.exe
|
||||
VPK_NO_PORTABLE: true
|
||||
VPK_FRAMEWORK: net8.0-x64-desktop,vcredist120-x64,vcredist143-x64
|
||||
|
||||
- run: ~/.dotnet/tools/vpk upload s3
|
||||
name: Upload new release
|
||||
env:
|
||||
VPK_KEY_ID: ${{ secrets.S3_KEY_ID }}
|
||||
VPK_SECRET: ${{ secrets.S3_SECRET }}
|
||||
VPK_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
|
||||
VPK_BUCKET: ${{ secrets.S3_BUCKET }}
|
||||
VPK_PREFIX: CringeLauncher
|
||||
VPK_KEEP_MAX_RELEASES: 3
|
||||
|
@@ -139,7 +139,7 @@ public class Launcher : ICorePlugin
|
||||
|
||||
private async Task CheckUpdates()
|
||||
{
|
||||
var mgr = new UpdateManager("https://the.place/you-host/updates");
|
||||
var mgr = new UpdateManager("https://dl.zznty.ru/CringeLauncher/");
|
||||
|
||||
// check for new version
|
||||
var newVersion = await mgr.CheckForUpdatesAsync();
|
||||
|
Reference in New Issue
Block a user