Skip to content

Commit 4afbcf7

Browse files
authored
Merge pull request RustedLessPass#26 from RustedLessPass/v1.1.0
V1.1.0
2 parents 4f7f0e5 + 6b960de commit 4afbcf7

File tree

20 files changed

+4521
-758
lines changed

20 files changed

+4521
-758
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ name: CD - Deploy WASM to GitHub Pages
66
# Controls when the workflow will run
77
on:
88
# Triggers the workflow on push or pull request events but only for the "master" branch
9-
release:
10-
types: [published]
9+
# release:
10+
# types: [published]
1111

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
@@ -64,4 +64,4 @@ jobs:
6464
steps:
6565
- name: Deploy to GitHub Pages
6666
id: deployment
67-
uses: actions/deploy-pages@v4
67+
uses: actions/deploy-pages@v4

.github/workflows/publish-app.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: "Publish APP"
2+
3+
on:
4+
# release:
5+
# types: [published]
6+
workflow_dispatch:
7+
8+
# `tauri-action` can also upload app bundles to an existing GitHub release.
9+
# This workflow uses different actions to create and publish the release.
10+
# `tauri-action` will only build and upload the app bundles to the specified release.
11+
12+
jobs:
13+
create-release:
14+
permissions:
15+
contents: write
16+
runs-on: ubuntu-latest
17+
outputs:
18+
release_id: ${{ steps.create-release.outputs.result }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: setup node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: lts/*
27+
28+
- name: get version
29+
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
30+
31+
- name: create release
32+
id: create-release
33+
uses: actions/github-script@v6
34+
with:
35+
script: |
36+
const { data } = await github.rest.repos.createRelease({
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
tag_name: `app-v${process.env.PACKAGE_VERSION}`,
40+
name: `Desktop App v${process.env.PACKAGE_VERSION}`,
41+
body: 'Take a look at the assets to download and install this app.',
42+
draft: true,
43+
prerelease: false
44+
})
45+
return data.id
46+
47+
build-tauri:
48+
needs: create-release
49+
permissions:
50+
contents: write
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
settings:
55+
- platform: "macos-latest" # for Arm based macs (M1 and above).
56+
args: "--target aarch64-apple-darwin"
57+
- platform: "macos-latest" # for Intel based macs.
58+
args: "--target x86_64-apple-darwin"
59+
- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04.
60+
args: ""
61+
- platform: "windows-latest"
62+
args: ""
63+
64+
runs-on: ${{ matrix.settings.platform }}
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Git submodule
69+
run: |
70+
git submodule update --init --recursive
71+
72+
- name: install Rust stable
73+
uses: dtolnay/rust-toolchain@stable
74+
with:
75+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
76+
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
77+
- name: install wasm32
78+
uses: actions-rs/toolchain@v1
79+
with:
80+
toolchain: stable
81+
target: wasm32-unknown-unknown
82+
83+
- name: install dependencies (ubuntu only)
84+
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
85+
run: |
86+
sudo apt-get update
87+
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
88+
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
89+
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
90+
- name: Install Trunk
91+
uses: jetli/trunk-action@v0.4.0
92+
with:
93+
# Optional version of trunk to install(eg. 'v0.16.0', 'latest')
94+
version: "latest"
95+
- name: Install tauri-cli from crates.io
96+
uses: baptiste0928/cargo-install@v3
97+
with:
98+
crate: tauri-cli
99+
version: "^2.0.0-beta.12" # You can specify any semver range
100+
- uses: tauri-apps/tauri-action@v0
101+
env:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
with:
104+
tauriScript: cargo tauri
105+
releaseId: ${{ needs.create-release.outputs.release_id }}
106+
args: ${{ matrix.settings.args }}
107+
108+
publish-release:
109+
permissions:
110+
contents: write
111+
runs-on: ubuntu-latest
112+
needs: [create-release, build-tauri]
113+
114+
steps:
115+
- name: publish release
116+
id: publish-release
117+
uses: actions/github-script@v6
118+
env:
119+
release_id: ${{ needs.create-release.outputs.release_id }}
120+
with:
121+
script: |
122+
github.rest.repos.updateRelease({
123+
owner: context.repo.owner,
124+
repo: context.repo.repo,
125+
release_id: process.env.release_id,
126+
draft: false,
127+
prerelease: false
128+
})
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "test-on-pr"
2+
3+
on: [pull_request]
4+
5+
# This workflow will build your tauri app without uploading it anywhere.
6+
7+
jobs:
8+
test-tauri:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
settings:
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: ""
21+
22+
runs-on: ${{ matrix.settings.platform }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Git submodule
27+
run: |
28+
git submodule update --init --recursive
29+
30+
- name: install Rust stable
31+
uses: dtolnay/rust-toolchain@stable
32+
with:
33+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
34+
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
35+
- name: install wasm32
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: stable
39+
target: wasm32-unknown-unknown
40+
41+
- name: install dependencies (ubuntu only)
42+
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
46+
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
47+
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
48+
- name: Install Trunk
49+
uses: jetli/trunk-action@v0.4.0
50+
with:
51+
# Optional version of trunk to install(eg. 'v0.16.0', 'latest')
52+
version: "latest"
53+
- name: Install tauri-cli from crates.io
54+
uses: baptiste0928/cargo-install@v3
55+
with:
56+
crate: tauri-cli
57+
version: "^2.0.0-beta.12" # You can specify any semver range
58+
- uses: tauri-apps/tauri-action@v0
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
with:
62+
tauriScript: cargo tauri
63+
args: ${{ matrix.settings.args }}

.gitignore

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,3 @@
1-
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,rust,rust-analyzer
2-
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,rust,rust-analyzer
3-
4-
### Rust ###
5-
# Generated by Cargo
6-
# will have compiled files and executables
7-
debug/
8-
target/
9-
dist/
10-
11-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
12-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
13-
Cargo.lock
14-
15-
# These are backup files generated by rustfmt
16-
**/*.rs.bk
17-
18-
# MSVC Windows builds of rustc generate these, which store debugging information
19-
*.pdb
20-
21-
### rust-analyzer ###
22-
# Can be generated by other build systems other than cargo (ex: bazelbuild/rust_rules)
23-
rust-project.json
24-
25-
26-
### VisualStudioCode ###
27-
.vscode/*
28-
!.vscode/settings.json
29-
!.vscode/tasks.json
30-
!.vscode/launch.json
31-
!.vscode/extensions.json
32-
!.vscode/*.code-snippets
33-
34-
# Local History for Visual Studio Code
35-
.history/
36-
37-
# Built Visual Studio Code Extensions
38-
*.vsix
39-
40-
### VisualStudioCode Patch ###
41-
# Ignore all local history of files
42-
.history
43-
.ionide
44-
45-
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,rust,rust-analyzer
1+
/dist/
2+
/target/
3+
/Cargo.lock

.taurignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/src
2+
/public
3+
/Cargo.toml

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"emmet.includeLanguages": {
3+
"rust": "html"
4+
},
5+
"conventionalCommits.scopes": [
6+
"tauri",
7+
"pages",
8+
"actions"
9+
]
10+
}

0 commit comments

Comments
 (0)