Skip to content

custom release

custom release #51

Workflow file for this run

name: Build
on:
push:
branches:
- master
tags:
- v*
permissions: write-all
jobs:
windows:
strategy:
fail-fast: false
matrix:
arch:
- x64
- ia32
- arm64
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Dependencies
run: |
pnpm install
pnpm prepare --${{ matrix.arch }}
- name: Build
run: pnpm build:win --${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Windows ${{ matrix.arch }}
path: dist/*.exe
if-no-files-found: error
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.exe
dist/*.blockmap
token: ${{ secrets.GITHUB_TOKEN }}
- name: Merge Yaml
if: startsWith(github.ref, 'refs/tags/v')
run: pnpm updater latest.yml
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: dist/latest.yml
token: ${{ secrets.GITHUB_TOKEN }}
linux:
strategy:
fail-fast: false
matrix:
arch:
- x64
- arm64
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Dependencies
run: |
pnpm install
pnpm prepare --${{ matrix.arch }}
- name: Build
run: pnpm build:linux --${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Linux ${{ matrix.arch }}
path: |
dist/*.deb
dist/*.rpm
if-no-files-found: error
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.deb
dist/*.rpm
dist/*.blockmap
token: ${{ secrets.GITHUB_TOKEN }}
- name: Merge Yaml
if: startsWith(github.ref, 'refs/tags/v') && matrix.arch == 'x64'
run: pnpm updater latest-linux.yml
- name: Merge Yaml
if: startsWith(github.ref, 'refs/tags/v') && matrix.arch == 'arm64'
run: pnpm updater latest-linux-arm64.yml
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
dist/latest-linux.yml
dist/latest-linux-arm64.yml
token: ${{ secrets.GITHUB_TOKEN }}
macos:
strategy:
fail-fast: false
matrix:
arch:
- x64
- arm64
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Dependencies
run: |
pnpm install
pnpm prepare --${{ matrix.arch }}
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm build:mac --${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: MacOS ${{ matrix.arch }}
path: dist/*.dmg
if-no-files-found: error
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.dmg
dist/*.zip
dist/*.blockmap
token: ${{ secrets.GITHUB_TOKEN }}
- name: Merge Yaml
if: startsWith(github.ref, 'refs/tags/v')
run: pnpm updater latest-mac.yml
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: dist/latest-mac.yml
token: ${{ secrets.GITHUB_TOKEN }}