59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: 'Build Plugin'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'v0.1'
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 6.0.x
|
|
|
|
- name: Restore dependencies
|
|
run: dotnet restore
|
|
|
|
- name: Embed version info
|
|
run: echo "${{ github.sha }}" > ConfusedPolarBear.Plugin.IntroSkipper/Configuration/version.txt
|
|
|
|
- name: Build
|
|
run: dotnet build --no-restore
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4.3.1
|
|
with:
|
|
name: ConfusedPolarBear.Plugin.IntroSkipper-${{ github.event.head_commit.message }}.dll
|
|
path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
|
if-no-files-found: error
|
|
|
|
- name: Create archive
|
|
uses: vimtor/action-zip@v1.2
|
|
with:
|
|
files: |
|
|
ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
|
dest: intro-skipper-${{ github.event.head_commit.message }}.zip
|
|
|
|
- name: Publish release
|
|
uses: 8bitDream/action-github-releases@v1.0.0
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: ${{ github.event.head_commit.message }}
|
|
prerelease: false
|
|
title: intro-skipper-${{ github.event.head_commit.message }}
|
|
files: |
|
|
intro-skipper-${{ github.event.head_commit.message }}.zip
|