Make windows build cooperate better
This commit is contained in:
parent
da4797bdc8
commit
1081de2b30
|
|
@ -33,6 +33,25 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||||
|
|
||||||
|
- name: Set version for Windows build
|
||||||
|
run: |
|
||||||
|
# Get the version from the Git tag (e.g., v0.6.3-alpha)
|
||||||
|
VERSION=$(echo ${GITHUB_REF#refs/tags/})
|
||||||
|
|
||||||
|
# Replace '-alpha' with '-0' and '-beta' with '-1' only for Windows version
|
||||||
|
if [[ $VERSION == *"-alpha"* ]]; then
|
||||||
|
WINDOWS_VERSION=${VERSION%-alpha}-0
|
||||||
|
elif [[ $VERSION == *"-beta"* ]]; then
|
||||||
|
WINDOWS_VERSION=${VERSION%-beta}-1
|
||||||
|
else
|
||||||
|
WINDOWS_VERSION=$VERSION # Keep the same version for non-alpha/beta tags
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy tauri.conf.json to tauri.windows.conf.json and substitute version number for Windows
|
||||||
|
cp src-tauri/tauri.conf.json src-tauri/tauri.windows.conf.json
|
||||||
|
sed -i "s/\"version\": \".*\"/\"version\": \"${WINDOWS_VERSION}\"/" src-tauri/tauri.windows.conf.json
|
||||||
|
|
||||||
|
|
||||||
- name: setup pnpm
|
- name: setup pnpm
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -58,13 +77,13 @@ jobs:
|
||||||
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
|
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
|
||||||
run: pnpm install # change this to npm or pnpm depending on which one you use.
|
run: pnpm install # change this to npm or pnpm depending on which one you use.
|
||||||
|
|
||||||
- uses: tauri-apps/tauri-action@v0
|
- name: Create Release with Tauri Action
|
||||||
|
uses: tauri-apps/tauri-action@v0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
|
tagName: "app-v${VERSION}" # Use the original version tag for the release
|
||||||
releaseName: 'App v__VERSION__'
|
releaseName: "App v${VERSION}"
|
||||||
releaseBody: 'See the assets to download this version and install.'
|
releaseBody: 'See the assets to download this version and install.'
|
||||||
releaseDraft: true
|
releaseDraft: false # Set to true if you want the release to be a draft
|
||||||
prerelease: false
|
prerelease: true
|
||||||
args: ${{ matrix.args }}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue