diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..4a38571 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,22 @@ +{ + "extends": ["config:recommended", "group:all", "schedule:weekly", ":widenPeerDependencies"], + "enabledManagers": ["cargo", "github-actions", "npm"], + "packageRules": [ + { + "matchUpdateTypes": ["patch"], + "enabled": false + }, + { + "matchManagers": ["cargo"], + "automerge": true, + "minimumReleaseAge": "2 days" + }, + { + "matchManagers": ["bun"], + "automerge": true, + "minimumReleaseAge": "2 days" + } + ], + "timezone": "America/Sao_Paulo", + "dependencyDashboard": true +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5810a76 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,62 @@ +name: 'publish' + +on: + push: + tags: + - v*.*.* + workflow_dispatch: + +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: true + +jobs: + publish-tauri: + permissions: + contents: write + strategy: + fail-fast: false + matrix: + include: + - platform: 'macos-latest' + args: '--target aarch64-apple-darwin' + # Uncomment for Intel builds + # - platform: 'macos-latest' # for Intel based macs. + # args: '--target x86_64-apple-darwin' + - platform: 'ubuntu-24.04' + args: '' + - platform: 'windows-latest' + args: '' + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + - run: bun i + + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + + - name: install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-24.04' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + + - name: Build Tauri + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. + releaseName: 'v__VERSION__' + releaseBody: 'See [CHANGES.md](https://github.com/alysonhower/tauri2-svelte5-boilerplate/blob/main/CHANGES.md) for a complete list of changes.' + releaseDraft: true + prerelease: false + args: ${{ matrix.args }} diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 0000000..d5811d2 --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,47 @@ +name: Build + +on: + push: + branches: + - main + paths: + - 'src/**' + - 'src-tauri/**' + - 'tests/**' + - 'bun.lockb' + - 'src-tauri/Cargo.lock' + - '.github/workflows/test-build.yml' + pull_request: + workflow_dispatch: + +concurrency: + group: build-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-tauri: + permissions: + contents: write + strategy: + fail-fast: true + + runs-on: 'ubuntu-24.04' + steps: + - uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + - run: bun i + + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable + + - name: install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + + - name: Build Tauri + run: bun tauri build diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..7629c8d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "rust-lang.rust-analyzer", + "tauri-apps.tauri-vscode", + "svelte.svelte-vscode", + "bradlc.vscode-tailwindcss", + "esbenp.prettier-vscode" + ] +} diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..06029f0 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,5 @@ +# Changelog + +## 1.0.0 (2024-11-15) + +- Feat: implement ci/cd config \ No newline at end of file diff --git a/package.json b/package.json index 16a409a..eba85ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tauri2-svelte5-boilerplate", - "version": "0.0.1", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite dev", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index b69ea8a..43df32e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,8 +1,8 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "tauri2-svelte5-boilerplate", - "version": "0.1.0", - "identifier": "com.tauri.dev", + "version": "1.0.0", + "identifier": "com.tauri2-svelte5-boilerplace.dev", "build": { "frontendDist": "../build", "devUrl": "http://localhost:1420",