diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d6dae11 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,52 @@ +name: App Builder +on: + push: + tags: + - "v*" + workflow_dispatch: + +jobs: + release: + strategy: + fail-fast: false + matrix: + platform: [macos-latest, windows-latest] + include: + - os: macos-latest + rust_target: x86_64-apple-darwin + - os: macos-latest + rust_target: aarch64-apple-darwin + - os: windows-latest + rust_target: x86_64-pc-windows-msvc + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Node.js setup + uses: actions/setup-node@v4 + with: + node-version: latest + + - name: Install Rust toolchain + run: | + rustup update --no-self-update + + - name: Install app dependencies from lockfile and build web + run: npm install && npm run build + + - name: Build the app + uses: tauri-apps/tauri-action@v0 + # if u get Error: Resource not accessible by integration + # go to repository Settings => Action => General => Workflow permissions => Switch to Read and Write permisions + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # tauri-action replaces \_\_VERSION\_\_ with the app version + tagName: ${{ github.ref_name }} + releaseName: "Sensor-Viewer v__VERSION__" + releaseBody: | + ${{steps.build_changelog.outputs.changelog}} + See the assets to download this version and install. + releaseDraft: true + prerelease: false