Skip to content

Me View

Me View #9

Workflow file for this run

name: Build & Release .NET App
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0'
- name: Publish
run: |
cd BangumiNet
dotnet publish -c Release -r win-x64 -p:Version=${GITHUB_REF_NAME#v} -o ../publish
- name: Create archive
run: |
cd publish
zip -r ../${{ github.event.repository.name }}-${{ github.ref_name }}-win64.zip .
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: app-archive
path: ${{ github.event.repository.name }}-${{ github.ref_name }}-win64.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: app-archive
path: .
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ${{ github.event.repository.name }}-${{ github.ref_name }}-win64.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}