Skip to content

Commit 34c54c0

Browse files
authored
Merge 219ec09 into 8b6aa13
2 parents 8b6aa13 + 219ec09 commit 34c54c0

42 files changed

Lines changed: 18788 additions & 7564 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/static.yml

Lines changed: 33 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,57 @@
1-
name: 'publish'
1+
name: "publish"
22

33
on: pull_request
44

55
jobs:
6-
create-release:
7-
permissions:
8-
contents: write
9-
runs-on: ubuntu-20.04
10-
outputs:
11-
release_id: ${{ steps.create-release.outputs.result }}
12-
13-
steps:
14-
- uses: actions/checkout@v3
15-
- name: setup node
16-
uses: actions/setup-node@v3
17-
with:
18-
node-version: 16
19-
- name: get version
20-
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
21-
- name: create release
22-
id: create-release
23-
uses: actions/github-script@v6
24-
with:
25-
script: |
26-
const { data } = await github.rest.repos.createRelease({
27-
owner: context.repo.owner,
28-
repo: context.repo.repo,
29-
tag_name: `release-${process.env.PACKAGE_VERSION}`,
30-
name: `Outliner ${process.env.PACKAGE_VERSION}`,
31-
body: 'Take a look at the assets to download and install this app.',
32-
draft: true,
33-
prerelease: false
34-
})
35-
return data.id
36-
37-
build-tauri:
38-
needs: create-release
6+
publish-tauri:
397
permissions:
408
contents: write
419
strategy:
4210
fail-fast: false
4311
matrix:
44-
platform: [macos-latest, ubuntu-20.04, windows-latest]
12+
include:
13+
- platform: "macos-latest" # for Arm based macs (M1 and above).
14+
args: "--target aarch64-apple-darwin"
15+
- platform: "macos-latest" # for Intel based macs.
16+
args: "--target x86_64-apple-darwin"
17+
- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04.
18+
args: ""
19+
- platform: "windows-latest"
20+
args: ""
4521

4622
runs-on: ${{ matrix.platform }}
4723
steps:
48-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
25+
4926
- name: setup node
50-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v4
5128
with:
52-
node-version: 16
29+
node-version: lts/*
30+
5331
- name: install Rust stable
5432
uses: dtolnay/rust-toolchain@stable
33+
with:
34+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
35+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
36+
5537
- name: install dependencies (ubuntu only)
56-
if: matrix.platform == 'ubuntu-20.04'
38+
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
5739
run: |
5840
sudo apt-get update
59-
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
41+
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
42+
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
43+
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
44+
6045
- name: install frontend dependencies
61-
run: yarn install # change this to npm or pnpm depending on which one you use
46+
run: yarn install # change this to npm, pnpm or bun depending on which one you use.
47+
6248
- uses: tauri-apps/tauri-action@v0
6349
env:
6450
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6551
with:
66-
releaseId: ${{ needs.create-release.outputs.release_id }}
67-
68-
publish-release:
69-
permissions:
70-
contents: write
71-
runs-on: ubuntu-20.04
72-
needs: [create-release, build-tauri]
73-
74-
steps:
75-
- name: publish release
76-
id: publish-release
77-
uses: actions/github-script@v6
78-
env:
79-
release_id: ${{ needs.create-release.outputs.release_id }}
80-
with:
81-
script: |
82-
github.rest.repos.updateRelease({
83-
owner: context.repo.owner,
84-
repo: context.repo.repo,
85-
release_id: process.env.release_id,
86-
draft: false,
87-
prerelease: false
88-
})
52+
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
53+
releaseName: "App v__VERSION__"
54+
releaseBody: "See the assets to download this version and install."
55+
releaseDraft: true
56+
prerelease: false
57+
args: ${{ matrix.args }}

0 commit comments

Comments
 (0)