diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..a1843b9 --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,55 @@ +name: Compile + +on: + push: + branches: [ "master", "workflow" ] + pull_request: + branches: [ "master", "workflow" ] + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4.0.3 + with: + node-version: 20 + + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable + + - name: Setup pnpm + uses: pnpm/action-setup@v4.0.0 + with: + version: 9.3.0 + run_install: false + + - name: Install dependencies of pnpm + run: pnpm install --frozen-lockfile + + - name: compile + run: pnpm run tauri-build + + - name: List generated files + run: dir src-tauri/target/release/bundle/nsis + + - name: Debug ref + run: echo "github.ref is ${{ github.ref }}" + + - name: Create GitHub Release + id: create_release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: src-tauri/target/release/bundle/nsis/*.exe + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}