Skip to content

release: v1.2.8

release: v1.2.8 #48

Workflow file for this run

name: Release CI
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
RELEASE_UPLOAD_ID: ${{ steps.create_release.outputs.id }}
RELEASE_UPLOAD_URL: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- uses: ncipollo/release-action@v1
id: create_release
with:
generateReleaseNotes: true
makeLatest: true
token: ${{ secrets.API_TOKEN }}
build-tauri:
needs: create-release
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: setup yarn cache
uses: actions/cache/restore@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: setup rust cache
uses: actions/cache/restore@v3
id: rust-cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: setup yarn dependencies
run: yarn
- uses: tauri-apps/[email protected]
name: build
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_PRIVATE_PASSWORD: ""
with:
releaseId: ${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }}
deploy-github-pages:
needs: [build-tauri, create-release]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: setup yarn cache
uses: actions/cache/restore@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: setup yarn dependencies
run: yarn
- name: build
run: yarn build
- name: pack
run: tar -czvf gh_pages.tar.gz dist
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.RELEASE_UPLOAD_URL }}
asset_path: ./gh_pages.tar.gz
asset_name: gh_pages.tar.gz
asset_content_type: application/gzip
- name: before deploy
run: |
yarn updateJson
touch dist/.nojekyll
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}
- name: deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
clean: true