-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
518 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,9 @@ name: Release CI | |
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
create-release: | ||
|
@@ -27,9 +28,9 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: '${{ steps.get_version.outputs.VERSION }}' | ||
release_name: 'app ${{ steps.get_version.outputs.VERSION }}' | ||
release_name: 'BiliTools | ${{ steps.get_version.outputs.VERSION }}' | ||
body: 'See the assets to download this version and install.' | ||
|
||
build-tauri: | ||
needs: create-release | ||
strategy: | ||
|
@@ -77,5 +78,41 @@ jobs: | |
- uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | ||
with: | ||
releaseId: ${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }} | ||
|
||
# 生成静态资源并将其推送到公仓 | ||
updater: | ||
runs-on: ubuntu-latest | ||
needs: [create-release, build-tauri] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: yarn updater | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout btjawa/BiliTools repository | ||
uses: actions/checkout@v2 | ||
with: | ||
releaseId: ${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }} | ||
repository: btjawa/BiliTools | ||
token: ${{ secrets.PAT }} | ||
path: 'BiliTools' | ||
fetch-depth: 0 # 确保获取所有历史记录以便正确定位分支 | ||
|
||
- name: Copy files to BiliTools repository | ||
run: | | ||
cp -r ./updater/* ./BiliTools/ | ||
- name: Commit and push to updater branch | ||
run: | | ||
cd BiliTools | ||
git checkout updater || git checkout -b updater | ||
git config --global user.name 'GitHub Actions' | ||
git config --global user.email '[email protected]' | ||
git add . | ||
git commit -m "Update updater branch" | ||
git push --set-upstream origin updater |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.