Skip to content

chore: bump version to v0.11.1 #115

chore: bump version to v0.11.1

chore: bump version to v0.11.1 #115

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- build: linux
os: ubuntu-latest
arch: x86_64
target: x86_64-unknown-linux-gnu
- build: macos
os: macos-latest
arch: x86_64
target: x86_64-apple-darwin
- build: macos
os: macos-latest
arch: aarch64
target: aarch64-apple-darwin
- build: windows
os: windows-latest
arch: x86_64
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev libxcb-shape0-dev libxcb-xfixes0-dev libsoup-3.0 javascriptcoregtk-4.1 webkit2gtk-4.1
- name: Write env file
run: |
echo VITE_FIREBASE_APIKEY=${{ secrets.VITE_FIREBASE_APIKEY }} >> ./apps/desktop/.env.prod
echo VITE_FIREBASE_APPID=${{ secrets.VITE_FIREBASE_APPID }} >> ./apps/desktop/.env.prod
echo VITE_FIREBASE_MESSAGINGSENDERID=${{ secrets.VITE_FIREBASE_MESSAGINGSENDERID }} >> ./apps/desktop/.env.prod
echo VITE_FIREBASE_MEASUREMENTID=${{ secrets.VITE_FIREBASE_MEASUREMENTID }} >> ./apps/desktop/.env.prod
echo VITE_UMENG_APPKEY=${{ secrets.VITE_UMENG_APPKEY }} >> ./apps/desktop/.env.prod
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
excludeTypes: 'chore,docs,style,refactor,test,ci,build'
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@2656b87321093db1cb55fbd73183d195214fdfd1 # v2
with:
key: ${{ matrix.target }}
- name: Install dependencies
run: yarn install --immutable
- name: Build workspaces
run: yarn build
- name: Install rust target
run: rustup target add ${{ matrix.target }}
- name: Build the app
run: yarn build:desktop --target ${{ matrix.target }}
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: artifacts-${{ matrix.arch }}
path: |
./target/${{ matrix.target }}/release/bundle/appimage/**.AppImage.*
./target/${{ matrix.target }}/release/bundle/deb/**.deb
- uses: actions/upload-artifact@v3
if: matrix.os == 'macos-latest'
with:
name: artifacts-${{ matrix.arch }}
path: |
./target/${{ matrix.target }}/release/bundle/dmg/**.dmg
./target/${{ matrix.target }}/release/bundle/macos/**.app.*
- uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: artifacts-${{ matrix.arch }}
path: |
./target/${{ matrix.target }}/release/bundle/msi/**
release:
permissions:
contents: write
needs: build
runs-on: ubuntu-latest
steps:
- name: Query version number
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Download x86_64 artifacts
uses: actions/download-artifact@v3
with:
name: artifacts-x86_64
path: artifacts/x86_64
- name: Download aarch64 artifacts
uses: actions/download-artifact@v3
with:
name: artifacts-aarch64
path: artifacts/aarch64
- name: Rename artifacts
run: |
mv "artifacts/aarch64/dmg/MarkFlowy_${{ env.version }}_aarch64.dmg" "artifacts/MarkFlowy_${{ env.version }}_macos_aarch64.dmg"
mv "artifacts/aarch64/macos/MarkFlowy.app.tar.gz" "artifacts/MarkFlowy_${{ env.version }}_macos_aarch64.app.tar.gz"
mv "artifacts/aarch64/macos/MarkFlowy.app.tar.gz.sig" "artifacts/MarkFlowy_${{ env.version }}_macos_aarch64.app.tar.gz.sig"
mv "artifacts/x86_64/dmg/MarkFlowy_${{ env.version }}_x64.dmg" "artifacts/MarkFlowy_${{ env.version }}_macos_x86_64.dmg"
mv "artifacts/x86_64/macos/MarkFlowy.app.tar.gz" "artifacts/MarkFlowy_${{ env.version }}_macos_x86_64.app.tar.gz"
mv "artifacts/x86_64/macos/MarkFlowy.app.tar.gz.sig" "artifacts/MarkFlowy_${{ env.version }}_macos_x86_64.app.tar.gz.sig"
mv "artifacts/x86_64/deb/MarkFlowy_${{ env.version }}_amd64.deb" "artifacts/x86_64/deb/MarkFlowy_${{ env.version }}_linux_x86_64.deb"
mv "artifacts/x86_64/appimage/MarkFlowy_${{ env.version }}_amd64.AppImage.tar.gz" "artifacts/MarkFlowy_${{ env.version }}_linux_x86_64.AppImage.tar.gz"
mv "artifacts/x86_64/appimage/MarkFlowy_${{ env.version }}_amd64.AppImage.tar.gz.sig" "artifacts/MarkFlowy_${{ env.version }}_linux_x86_64.AppImage.tar.gz.sig"
mv "artifacts/x86_64/MarkFlowy_${{ env.version }}_x64_en-US.msi" "artifacts/MarkFlowy_${{ env.version }}_windows_x86_64.msi"
mv "artifacts/x86_64/MarkFlowy_${{ env.version }}_x64_en-US.msi.zip" "artifacts/MarkFlowy_${{ env.version }}_windows_x86_64.msi.zip"
mv "artifacts/x86_64/MarkFlowy_${{ env.version }}_x64_en-US.msi.zip.sig" "artifacts/MarkFlowy_${{ env.version }}_windows_x86_64.msi.zip.sig"
- name: Create Release
uses: softprops/action-gh-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: v${{ env.version }}
releaseName: v${{ env.version }}
releaseBody: v${{ env.version }}
releaseDraft: false
prerelease: true
files: ./artifacts/**/*
updater:
runs-on: ubuntu-latest
needs: release
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install --immutable
- name: Updater JSON
run: yarn updater --token=${{ secrets.GITHUB_TOKEN }}
- name: Deploy install.json
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apps/desktop/updater
# force_orphan: true
- name: Query version number
run: echo "version=${{ env.version }}" >> $GITHUB_ENV