Skip to content

Merge pull request #9 from frg2089/dependabot/npm_and_yarn/vite-7.1.11 #57

Merge pull request #9 from frg2089/dependabot/npm_and_yarn/vite-7.1.11

Merge pull request #9 from frg2089/dependabot/npm_and_yarn/vite-7.1.11 #57

Workflow file for this run

name: 构建
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
outputs:
artifact: ${{ steps.artifact.outputs.artifact-url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: latest
cache: pnpm
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install Frontend dependencies
run: pnpm install
- name: Build Frontend
run: pnpm --recursive build
- name: Restore .NET
run: dotnet restore --graph --artifacts-path artifacts
- name: Build .NET
run: dotnet build --graph --artifacts-path artifacts --configuration Release --no-restore
- name: Publish .NET
run: dotnet publish --graph --artifacts-path artifacts --configuration Release --no-restore --no-build
- id: artifact
name: Collect artifact
uses: actions/upload-artifact@v4
with:
name: artifact
path: |
./artifacts/publish/BiliLive.Service/release/*
retention-days: 7
publish:
needs: build
name: 发布
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
discussions: write
runs-on: ubuntu-latest
steps:
- name: Download a Build Artifact
shell: pwsh
run: curl '${{ needs.build.outputs.artifact }}' -o BiliLive.Observer.zip
- name: Release
uses: softprops/action-gh-release@v2
with:
files: BiliLive.Observer.zip