Skip to content

Publish release

Publish release #54

Workflow file for this run

# 打包发布Release
name: Publish release
on:
workflow_dispatch:
permissions:
contents: write
discussions: write
jobs:
build:
name: Publish Release
if: ${{ github.repository == 'RayWangQvQ/BiliBiliToolPro' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Publish and Zip Release
run: |
cd ./scripts
chmod +x ./publish.sh
./publish.sh --runtime all
- name: Extract Release Notes
id: release_notes
run: |
content=$(sed -n '/^## /{p;:a;n;/^## /q;p;ba}' CHANGELOG.md)
version=$(echo "$GITHUB_REF" | sed 's/refs\/tags\///')
echo "version=$version" >> $GITHUB_OUTPUT
{
echo 'content<<EOF'
echo '$content'
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: './src/Ray.BiliBiliTool.Console/bin/Publish/*.zip'
token: ${{ secrets.GITHUB_TOKEN }}
name: "BiliBiliToolPro-V${{ steps.release_notes.outputs.version }}"
tag_name: ${{ github.event.inputs.version }}
body: '${{ steps.release_notes.outputs.content }}'
discussion_category_name: Announcements
generate_release_notes: true
fail_on_unmatched_files: true