Skip to content

chore: release 1.3.1 #33

chore: release 1.3.1

chore: release 1.3.1 #33

Workflow file for this run

name: Release
env:
HUSKY: 0
on:
push:
branches:
- release
jobs:
create-release:
permissions:
contents: write
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.create-release.outputs.result }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
ref: release
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: get version
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: create release
id: create-release
uses: actions/github-script@v7
with:
script: |
const { data } = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `v${process.env.PACKAGE_VERSION}`,
target_commitish: 'release',
name: `qSpider 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-web:
needs: [create-release]
runs-on: ubuntu-latest
env:
CYPRESS_INSTALL_BINARY: 0
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
ref: release
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
filename: 'qspider-player.zip'
path: .
directory: dist/apps/player
- name: Upload Release Asset
uses: actions/github-script@v7
env:
release_id: ${{ needs.create-release.outputs.release_id }}
with:
script: |
const fs = require('fs');
// Upload the release asset
await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.release_id,
name: "qspider-player.zip",
data: await fs.readFileSync('dist/apps/player/qspider-player.zip')
});
build-web-standalone:
needs: [create-release]
runs-on: ubuntu-latest
env:
CYPRESS_INSTALL_BINARY: 0
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
ref: release
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build:standalone
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
filename: 'qspider-player-standalone.zip'
path: .
directory: dist/apps/player-standalone
- name: Upload Release Asset
uses: actions/github-script@v7
env:
release_id: ${{ needs.create-release.outputs.release_id }}
with:
script: |
const fs = require('fs');
// Upload the release asset
await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.release_id,
name: "qspider-player-standalone.zip",
data: await fs.readFileSync('dist/apps/player-standalone/qspider-player-standalone.zip')
});
build-desktop:
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target universal-apple-darwin'
- platform: 'ubuntu-20.04'
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
env:
CYPRESS_INSTALL_BINARY: 0
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
ref: release
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-pulseaudio
- run: npm ci
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}
updaterJsonPreferNsis: true
args: ${{ matrix.args }}
publish-release:
permissions:
contents: write
runs-on: ubuntu-20.04
needs: [create-release, build-desktop, build-web, build-web-standalone]
steps:
- name: publish release
id: publish-release
uses: actions/github-script@v7
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
})