🚀 v0.6.3 #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
name: Build Windows | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
env: | |
BANGUMI_APP_ID: ${{ secrets.BANGUMI_APP_ID }} | |
BANGUMI_APP_SECRET: ${{ secrets.BANGUMI_APP_SECRET }} | |
steps: | |
- name: 签出仓库 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: master | |
- name: 初始化 Flutter 环境 | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
architecture: x64 | |
- name: 检查环境 | |
run: flutter doctor | |
- name: 拉取依赖 | |
run: flutter pub get | |
- name: 写入 .env | |
shell: pwsh | |
run: | | |
New-Item -Path . -Name .env -ItemType File -Force | |
Add-Content -Path .env -Value "BANGUMI_APP_ID=${env:BANGUMI_APP_ID}" | |
Add-Content -Path .env -Value "BANGUMI_APP_SECRET=${env:BANGUMI_APP_SECRET}" | |
- name: 打包并压缩 | |
run: | | |
flutter build windows | |
Compress-Archive -Path ./build/windows/x64/runner/Release/* -DestinationPath BangumiToday.zip | |
- name: 打包msix | |
run: dart run msix:create -p ${{ secrets.SIGN_SECRET }} | |
- name: 打包msix-Store | |
run: > | |
dart run msix:create | |
--store true | |
-i "27581BTMuli.BangumiToday" | |
-b "CN=5FE33156-C3CE-4E71-A036-81BAA99521CB" | |
-n "BangumiToday_Store" | |
-p ${{ secrets.SIGN_SECRET }} | |
- name: 上传文件 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: BangumiToday | |
path: | | |
BangumiToday.zip | |
BangumiToday.msix | |
BangumiToday_Store.msix | |
- name: 发行Release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
draft: true | |
files: | | |
BangumiToday.zip | |
BangumiToday.msix | |
BangumiToday_Store.msix |