Skip to content

Commit

Permalink
Merge pull request #17 from jswhisperer/main
Browse files Browse the repository at this point in the history
multi release workflow new
  • Loading branch information
imrofayel authored Dec 2, 2024
2 parents 6639dff + 700d348 commit ec51383
Show file tree
Hide file tree
Showing 23 changed files with 263 additions and 230 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Release
on:
push:
branches:
- main
tags:
- "v*"
workflow_dispatch:

# This is the example from the readme.
# On each push to the `release` branch it will create or update a GitHub release, build your app, and upload the artifacts to the release.

jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-latest" # for Arm based macs (M1 and above).
args: "--target aarch64-apple-darwin"
- platform: "macos-latest" # for Intel based macs.
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04.
args: ""
- platform: "windows-latest"
args: ""

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.x.x

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*

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

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

- name: install frontend dependencies
run: printf "@tiptap-pro:registry=https://registry.tiptap.dev/\n//registry.tiptap.dev/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc

- run: npm config set "//registry.tiptap.dev/:_authToken" ${{secrets.NPM_TOKEN}} && npm i

- uses: tauri-apps/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: "App v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"name": "nuxt-app",
"name": "fylepadtest",
"private": true,
"type": "module",
"version": "0.3.2",
"scripts": {
"nuxt": "nuxt",
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
"postinstall": "nuxt prepare",
"tauri": "tauri",
"tauri:dev": "pnpm tauri dev",
"tauri:build": "pnpm i && pnpm tauri build",
"tauri:icon": "pnpm tauri icon ./src-tauri/app-icon.png",
"tauri:build:debug": "pnpm tauri build --debug"
},
"dependencies": {
"@headlessui/vue": "^1.7.23",
Expand Down
Loading

0 comments on commit ec51383

Please sign in to comment.