Skip to content

Commit b606001

Browse files
committed
fix ci
1 parent f47d1fb commit b606001

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

.github/workflows/gh-release.yml

+16-23
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: 'publish'
33
on:
44
workflow_dispatch:
55

6+
# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release.
7+
68
jobs:
79
publish-tauri:
810
permissions:
@@ -11,12 +13,12 @@ jobs:
1113
fail-fast: false
1214
matrix:
1315
include:
14-
- platform: 'macos-latest' # for Arm based macs (M1 and above).
15-
args: '--target aarch64-apple-darwin'
16-
- platform: 'macos-latest' # for Intel based macs.
17-
args: '--target x86_64-apple-darwin'
18-
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
19-
args: ''
16+
# - platform: 'macos-latest' # for Arm based macs (M1 and above).
17+
# args: '--target aarch64-apple-darwin'
18+
# - platform: 'macos-latest' # for Intel based macs.
19+
# args: '--target x86_64-apple-darwin'
20+
# - platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
21+
# args: ''
2022
- platform: 'windows-latest'
2123
args: ''
2224

@@ -32,42 +34,33 @@ jobs:
3234
- name: install Rust stable
3335
uses: dtolnay/rust-toolchain@stable
3436
with:
37+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
3538
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
3639

3740
- name: install dependencies (ubuntu only)
38-
if: matrix.platform == 'ubuntu-22.04'
41+
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
3942
run: |
4043
sudo apt update
4144
sudo apt install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
45+
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
46+
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
4247

4348
- name: install frontend dependencies
44-
run: bun install --frozen-lockfile
49+
run: bun install --frozen-lockfile # change this to npm, pnpm or bun depending on which one you use.
4550

4651
- name: Get current date
4752
env:
4853
TZ: 'Asia/Tokyo'
4954
id: date
5055
run: echo "RELEASE_DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
5156

52-
- name: Fetch existing tags
53-
run: |
54-
gh auth setup-git
55-
TAGS=$(gh release list --limit 100 | grep -E "^${{ env.RELEASE_DATE }}([.][0-9]+)?$" | awk '{print $1}')
56-
if [ -z "$TAGS" ]; then
57-
PATCH=0
58-
else
59-
PATCH=$(echo "$TAGS" | sed 's/.*\.//' | sort -nr | head -n1)
60-
PATCH=$((PATCH + 1))
61-
fi
62-
echo "RELEASE_TAG=${{ env.RELEASE_DATE }}.${PATCH}" >> $GITHUB_ENV
63-
6457
- uses: tauri-apps/tauri-action@v0
6558
env:
6659
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6760
with:
68-
tagName: ${{ env.RELEASE_TAG }}
69-
releaseName: 'Version: ${{ env.RELEASE_TAG }}'
61+
tagName: ${{ env.RELEASE_DATE }}
62+
releaseName: 'Version: ${{ env.RELEASE_DATE }}'
7063
releaseBody: 'See the assets to download this version and install.'
7164
releaseDraft: true
7265
prerelease: false
73-
args: ${{ matrix.args }}
66+
args: ${{ matrix.args }}

0 commit comments

Comments
 (0)