wabbajack/.github/workflows/release.yml
2021-01-04 14:40:56 -07:00

63 lines
2.0 KiB
YAML

name: Create Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release Version'
required: true
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.101
- name: Restore dependencies
run: dotnet restore
- name: Remove Previous App
uses: JesseTG/rm@v1.0.0
with:
path: c:\tmp\PublishApp
- name: Remove Previous Launcher
uses: JesseTG/rm@v1.0.0
with:
path: c:\tmp\PublishLauncher
- name: Build
run: dotnet build --no-restore
- name: Publish App
run: dotnet publish Wabbajack\Wabbajack.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o c:\tmp\PublishApp --self-contained
- name: Publish Launcher
run: dotnet publish Wabbajack.Launcher\Wabbajack.Launcher.csproj --runtime win10-x64 --configuration Release /p:Platform=x64 -o c:\tmp\PublishLauncher --self-contained
- name: Sign App
uses: DanaBear/code-sign-action@v4
with:
certificate: ${{ secrets.CODE_CERT }}
password: ${{ secrets.CERT_PASSWORD }}
certificatesha1: ${{ secrets.CERT_THUMBPRINT }}
folder: c:\tmp\PublishApp
- name: Sign Launcher
uses: DanaBear/code-sign-action@v4
with:
certificate: ${{ secrets.CODE_CERT }}
password: ${{ secrets.CERT_PASSWORD }}
certificatesha1: ${{ secrets.CERT_THUMBPRINT }}
folder: c:\tmp\PublishLauncher
- name: Copy Launcher
uses: canastro/copy-action@0.0.2
with:
source: c:\tmp\PublishLauncher\Wabbajack.exe
destination: c:\wabbajack_releases\${{ github.event.inputs.version }}\Wabbajack.exe
- name: Zip Release
uses: vimtor/action-zip@v1
with:
files: c:\tmp\PublishApp
dest: c:\wabbajack_releases\${{ github.event.inputs.version }}\${{ github.event.inputs.version }}.zip