Bump tauri-plugin-updater from 2.0.0-alpha.4 to 2.0.0-alpha.5 in /src-tauri #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'publish' | |
# on a pull request and a push to the main branch | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
create-release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-20.04 | |
outputs: | |
release_id: ${{ steps.create-release.outputs.result }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: install cargo-tauri-version | |
run: cargo install cargo-tauri-version | |
- name: get version | |
run: echo "PACKAGE_VERSION=$(node version.js)" >> $GITHUB_ENV | |
- name: create release | |
id: create-release | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const { data } = await github.rest.repos.createRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
tag_name: `Multi-Op-QSO-Logger-v${process.env.PACKAGE_VERSION}`, | |
name: `Multi-op QSO Logger v${process.env.PACKAGE_VERSION}`, | |
body: 'Take a look at the assets to download and install this app.', | |
draft: true, | |
prerelease: false | |
}) | |
return data.id | |
build-tauri: | |
needs: create-release | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest, ubuntu-22.04, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Install Cargo Tauri for info | |
run: cargo install tauri-cli --version "^2.0.0-alpha" | |
- name: Tauri info | |
run: cargo tauri info | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
releaseId: ${{ needs.create-release.outputs.release_id }} | |
tauriScript: cargo tauri | |
publish-release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-22.04 | |
needs: [create-release, build-tauri] | |
steps: | |
- name: publish release | |
id: publish-release | |
uses: actions/github-script@v6 | |
env: | |
release_id: ${{ needs.create-release.outputs.release_id }} | |
with: | |
script: | | |
github.rest.repos.updateRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
release_id: process.env.release_id, | |
draft: false, | |
prerelease: false | |
}) | |
delete-release: | |
# only run this if all three of the matrix jobs fail (i.e. all platforms fail) | |
if: ${{ failure() && needs.build-tauri.result == 'failure' || needs.publish-release.result == 'failure' }} | |
permissions: | |
contents: write | |
runs-on: ubuntu-22.04 | |
needs: [create-release, build-tauri] | |
env: | |
release_id: ${{ needs.create-release.outputs.release_id }} | |
steps: | |
- name: delete release | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.repos.deleteRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
release_id: process.env.release_id | |
}) |