refactor: migrate to tauri #102
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: distributions release | |
on: | |
pull_request: | |
branches: [master] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pre-release: | |
strategy: | |
matrix: | |
include: | |
- platform: 'macos-latest' | |
args: '--target universal-apple-darwin' | |
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. | |
args: '' | |
- platform: 'windows-latest' | |
args: '' | |
node-version: [20.x] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Github checkout | |
uses: actions/checkout@v4 | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
if: matrix.platform == 'ubuntu-latest' | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: install frontend dependencies | |
run: npm ci --legacy-peer-deps | |
- run: npm run lint:check | |
- run: npm audit --audit-level=critical | |
- run: npm run test:ci | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- run: npm run build | |
- name: Generate changelog | |
uses: jaywcjlove/changelog-generator@main | |
id: changelog | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Tag Release | |
uses: jaywcjlove/create-tag-action@main | |
id: tag_release | |
with: | |
prerelease: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
body: | | |
${{ steps.changelog.outputs.compareurl }} | |
${{ steps.changelog.outputs.changelog }} | |
- name: Release App | |
uses: tauri-apps/tauri-action@v0 | |
if: steps.tag_release.outputs.successful | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# APPLE_ID: ${{ secrets.APPLE_ID }} | |
# APPLE_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
# APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
# APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
# APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
# APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
with: | |
tagName: ${{ steps.tag_release.outputs.version }} | |
releaseName: ${{ steps.tag_release.outputs.version }} | |
appVersion: "${{ steps.tag_release.outputs.versionNumber }}" | |
args: ${{ matrix.args }} | |
releaseBody: | | |
${{ steps.changelog.outputs.compareurl }} | |
${{ steps.changelog.outputs.changelog }} | |
releaseDraft: true | |
prerelease: true | |
# - name: Distribute artifacts to R2 | |
# uses: ryand56/r2-upload-action@master | |
# if: steps.tag_release.outputs.successful | |
# with: | |
# r2-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
# r2-access-key-id: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }} | |
# r2-secret-access-key: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }} | |
# r2-bucket: ${{ secrets.CLOUDFLARE_ARTIFACTS_R2 }} | |
# source-dir: out/make/ | |
# destination-dir: dockit |