Kilian von Pflugk 5d743302e4 Target 10.9.z
2024-03-29 20:53:19 +01:00

73 lines
2.3 KiB
YAML

name: 'Release Plugin'
on:
workflow_dispatch:
inputs:
version:
description: 'Version v'
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: 8.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-v${{ github.event.inputs.version }}.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-v${{ github.event.inputs.version }}.zip
- name: Generate md5
run: |
md5sum intro-skipper-v${{ github.event.inputs.version }}.zip > intro-skipper-v${{ github.event.inputs.version }}.zip.md5
echo "sourceUrl: https://github.com/${{ github.repository }}/releases/download/v${{ github.event.inputs.version }}/intro-skipper-v${{ github.event.inputs.version }}.zip"
echo "checksum: $(awk '{print $1}' intro-skipper-v${{ github.event.inputs.version }}.zip.md5)"
echo "timestamp: $(date +%FT%TZ)"
- name: Publish release
uses: 8bitDream/action-github-releases@v1.0.0
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: v${{ github.event.inputs.version }}
prerelease: false
title: v${{ github.event.inputs.version }}
files: |
intro-skipper-v${{ github.event.inputs.version }}.zip
intro-skipper-v${{ github.event.inputs.version }}.zip.md5
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: master