From e2a780a382bc8dba7ab42990c6471db38039bb97 Mon Sep 17 00:00:00 2001 From: Alex Rock Ancelet Date: Thu, 29 Aug 2024 23:03:51 +0200 Subject: [PATCH] Prepare everything for v1.0 --- .github/workflows/main.yaml | 52 +++++++++++++++++++++++++++++-------- CHANGELOG.md | 2 +- package.json | 2 +- src-tauri/Cargo.lock | 40 ++++++++++++++-------------- src-tauri/Cargo.toml | 19 +++++++++----- src-tauri/tauri.conf.json | 2 +- 6 files changed, 76 insertions(+), 41 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f48f326..227aff0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -2,11 +2,21 @@ name: Build Compotes app. on: push: - branches: [ rewrite ] + branches: [ main ] + tags: [ 'v[0-9]+.*' ] pull_request: - branches: [ rewrite ] + branches: [ main ] jobs: + create-release: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/create-gh-release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + build: strategy: fail-fast: false @@ -17,8 +27,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - { name: "Checkout the code", uses: actions/checkout@v2 } - + - uses: actions/checkout@v4 - name: 🗄️ Setup Rust cache uses: actions/cache@v2 with: @@ -32,7 +41,7 @@ jobs: - name: 🍃 Install Node.js uses: actions/setup-node@v2 with: - node-version: 16 + node-version: 18 cache: yarn cache-dependency-path: | yarn.lock @@ -77,10 +86,31 @@ jobs: run: | yarn test - - name: 🚀 Upload release artifacts - uses: actions/upload-artifact@v2 + upload-assets: + needs: + - create-release + - build + if: startsWith(github.ref, 'refs/tags/v') + strategy: + matrix: + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + - target: x86_64-apple-darwin + os: macos-latest + - target: x86_64-pc-windows-msvc + os: windows-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: taiki-e/upload-rust-binary-action@v1 with: - name: release-${{ matrix.os }} - path: | - src-tauri/target/release/compotes* - src-tauri/target/release/bundle/* + bin: src-tauri/target/release/compotes + manifest-path: src-tauri/Cargo.toml + target: ${{ matrix.target }} + tar: unix + zip: windows + token: ${{ secrets.GITHUB_TOKEN }} + include: LICENSE,README.md + archive: $bin-$tag-$target diff --git a/CHANGELOG.md b/CHANGELOG.md index 4df6cfd..d38a5c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -# v0.20.0 +# v1.0 Complete rewrite of the old hosted PHP/Symfony app into a Desktop app built with Svelte, Typescript, Rust and Tauri. diff --git a/package.json b/package.json index 5685f64..169858e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@orbitale/compotes-app", "version": "1.0.0", "private": true, - "license": "LGPL-3.0-or-later", + "license": "AGPL-3", "scripts": { "app": "concurrently --names \"front,back\" --raw \"vite dev\" \"tauri dev\"", "dev": "vite dev", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index a4b5baa..477bedd 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -86,26 +86,6 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" -[[package]] -name = "app" -version = "0.1.0" -dependencies = [ - "anyhow", - "chrono", - "dirs", - "regex", - "rusqlite", - "rusqlite_migration", - "serde", - "serde_json", - "serde_rusqlite", - "sha2", - "slugify", - "tauri", - "tauri-build", - "tauri-codegen", -] - [[package]] name = "arboard" version = "3.4.0" @@ -618,6 +598,26 @@ dependencies = [ "memchr", ] +[[package]] +name = "compotes" +version = "1.0.0" +dependencies = [ + "anyhow", + "chrono", + "dirs", + "regex", + "rusqlite", + "rusqlite_migration", + "serde", + "serde_json", + "serde_rusqlite", + "sha2", + "slugify", + "tauri", + "tauri-build", + "tauri-codegen", +] + [[package]] name = "concurrent-queue" version = "2.5.0" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index c96c894..60f4eba 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "app" -version = "0.1.0" -description = "A Tauri App" -authors = [ "you" ] -license = "" -repository = "" -default-run = "app" +name = "compotes" +version = "1.0.0" +description = "A desktop app to visualize bank account operations" +authors = [ "Alex \"Pierstoval\" Rock " ] +license = "AGPL-3" +repository = "https://github.com/Orbitale/Compotes" +default-run = "compotes" edition = "2018" [build-dependencies] @@ -28,3 +28,8 @@ tauri-codegen = { version = "1.4", features = [ ] } [features] custom-protocol = [ "tauri/custom-protocol" ] + +[profile.release] +codegen-units = 1 +lto = true +strip = "symbols" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 3330a76..63cb199 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "compotes", - "version": "0.1.0" + "version": "1.0.0" }, "build": { "distDir": "./target/frontend-build",