From 96377ccd4a71f855ad031964d50248420772b293 Mon Sep 17 00:00:00 2001 From: Kasper Date: Fri, 12 Nov 2021 01:21:36 +0100 Subject: [PATCH] Add github action --- .github/funding.yml | 1 + .github/workflows/publish.yml | 47 +++++++++++++++++++++++++++++++++++ README.md | 10 ++++++++ 3 files changed, 58 insertions(+) create mode 100644 .github/funding.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/funding.yml b/.github/funding.yml new file mode 100644 index 0000000..eba2b4d --- /dev/null +++ b/.github/funding.yml @@ -0,0 +1 @@ +github: [probablykasper] diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..f9f2a66 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +name: Release +on: + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +jobs: + release: + strategy: + fail-fast: false + matrix: + platform: [macos-10.15, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Node.js setup + uses: actions/setup-node@v1 + with: + node-version: 14 + + - name: Rust setup + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Install webkit2gtk (ubuntu only) + if: matrix.platform == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y webkit2gtk-4.0 + + - run: npm install + + - run: npm run build + + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # the action automatically replaces __VERSION__ with the app version + tagName: v__VERSION__ + releaseName: 'v__VERSION__' + releaseDraft: true + prerelease: false diff --git a/README.md b/README.md index 96bc0dd..5db6dcf 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,13 @@ - `npm run build`: Build - `npm run lint`: Lint - `npm run check`: Run svelte-check + +### Release new version +1. Update `CHANGELOG.md` +2. Manually bump the version number in `src-tauri/Cargo.toml` +3. Check for errors and bump the `Cargo.lock` version number + ``` + cargo check --manifest-path src-tauri/Cargo.toml + ``` +4. Dispatch the GitHub Release workflow and wait +5. Add release notes to the generated GitHub release and publish it