Release Brio #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Brio | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Version tag to create | |
required: true | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Download Dalamud | |
run: | | |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip | |
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev" | |
- name: Restore Dependencies | |
run: dotnet restore Brio.sln | |
- name: Build Brio | |
run: dotnet build Brio.sln --no-restore /p:Configuration=Release /p:Version=${{ github.event.inputs.version }} | |
- name: Zip Release | |
uses: TheDoctor0/zip-release@0.6.0 | |
with: | |
filename: '../../../../Brio.zip' | |
directory: './Brio/bin/x64/Release/' | |
exclusions: 'Brio Brio/*' | |
- name: Upload Release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "./Brio.zip" | |
name: Brio v${{ github.event.inputs.version }} | |
tag: v${{ github.event.inputs.version }} | |
draft: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit: ${{ vars.GITHUB_SHA }} | |
- name: Update repo.json | |
run: | | |
git config --global user.name "Actions User" | |
git config --global user.email "actions@github.com" | |
git fetch origin main && git checkout main | |
$ver = '${{ github.event.inputs.version }}' | |
$path = './Resources/Templates/repo.tmpl' | |
$new_path = './repo.json' | |
$content = get-content -path $path | |
$content = $content -replace '{version}',$ver | |
set-content -Path $new_path -Value $content | |
git add repo.json | |
git commit -m "[CI] Updating versions for v${{ github.event.inputs.version }}" || true | |
git push origin main || true |