File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9696 restore-keys : |
9797 ${{ runner.os }}-cargo-
9898
99+ - name : Extract version from tag
100+ shell : bash
101+ run : |
102+ VERSION=${GITHUB_REF#refs/tags/v}
103+ echo "VERSION=$VERSION" >> $GITHUB_ENV
104+ echo "Extracted version: $VERSION"
105+
106+ - name : Update version in tauri.conf.json
107+ shell : bash
108+ run : |
109+ if [[ "$RUNNER_OS" == "macOS" ]]; then
110+ sed -i '' "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" src-tauri/tauri.conf.json
111+ else
112+ sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" src-tauri/tauri.conf.json
113+ fi
114+ echo "Updated tauri.conf.json version to: $VERSION"
115+
116+ - name : Update version in Cargo.toml
117+ shell : bash
118+ run : |
119+ if [[ "$RUNNER_OS" == "macOS" ]]; then
120+ sed -i '' "s/^version = \".*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml
121+ else
122+ sed -i "s/^version = \".*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml
123+ fi
124+ echo "Updated Cargo.toml version to: $VERSION"
125+
99126 - name : Build Tauri app
100127 run : pnpm tauri build
101128 env :
You can’t perform that action at this time.
0 commit comments