50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Launcher
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: '8.0.x'
|
|
|
|
- run: dotnet nuget add source --name yandex-cloud https://nuget.storage.yandexcloud.net/index.json
|
|
name: Add nuget source
|
|
|
|
- run: dotnet restore CringeLauncher/CringeLauncher.csproj --locked-mode
|
|
name: Restore Project
|
|
|
|
- name: Git Version
|
|
id: version
|
|
uses: codacy/git-version@2.7.1
|
|
|
|
- run: dotnet publish -c Release -o ./pub CringeLauncher/CringeLauncher.csproj --no-restore -p:Version="${{ steps.version.outputs.version }}" -r win-x64 --no-self-contained
|
|
id: publish
|
|
name: Build Project
|
|
|
|
- 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
|
|
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
|