Skip to content

Commit

Permalink
自动更改版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Dec 28, 2023
1 parent 46f5731 commit 10c17d5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release
on:
push:
tags:
- "v*"
- "*.*.*"
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -45,14 +45,19 @@ jobs:
with:
version: 8
run_install: true

- name: Rewrite app version with tag name
run: |
sed -i "s/0.0.0/${{ github.ref_name }}/g" ./src-tauri/Cargo.toml
sed -i "s/0.0.0/${{ github.ref_name }}/g" ./src-tauri/src-tauri/tauri.conf.json
- name: Build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
releaseName: "App Name v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version.
releaseName: "Release v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version.
releaseBody: "See the assets to download and install this version."
releaseDraft: true
prerelease: false
Expand Down

0 comments on commit 10c17d5

Please sign in to comment.