Files
geekgeekrun/.github/workflows/release-ui.yml
2024-04-12 09:29:02 +08:00

131 lines
3.4 KiB
YAML

name: Release UI
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "ui-v*" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
# build_on_windows:
# env:
# PUPPETEER_SKIP_DOWNLOAD: 'true'
# runs-on: windows-latest
# permissions: write-all
# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - name: Checkout source
# uses: actions/checkout@v2
# - name: Install dependencies
# run: |
# npm i pnpm@^8.6.9 -g
# cd packages/ui
# pnpm i --force
# - name: Build
# run: |
# cd packages/ui
# node ./scripts/github-ci-build.mjs
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: binary-geekgeekrun-ui-windows-${{ github.sha }}
# path: |
# ${{ github.workspace }}/packages/ui/dist/*.exe
# overwrite: true
build_on_macos:
env:
PUPPETEER_SKIP_DOWNLOAD: 'true'
runs-on: macos-latest
permissions: write-all
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout source
uses: actions/checkout@v2
- name: Install dependencies
run: |
npm i pnpm@^8.6.9 -g
cd packages/ui
pnpm i --force
- name: Build
run: |
cd packages/ui
node ./scripts/github-ci-build.mjs
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: binary-geekgeekrun-ui-macos-${{ github.sha }}
path: |
${{ github.workspace }}/packages/ui/dist/*.dmg
overwrite: true
build_on_linux:
env:
PUPPETEER_SKIP_DOWNLOAD: 'true'
runs-on: ubuntu-latest
permissions: write-all
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout source
uses: actions/checkout@v2
- name: Install dependencies
run: |
npm i pnpm@^8.6.9 -g
cd packages/ui
pnpm i --force
- name: Build
run: |
cd packages/ui
node ./scripts/github-ci-build.mjs
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: binary-geekgeekrun-ui-linux-${{ github.sha }}
path: |
${{ github.workspace }}/packages/ui/dist/*.deb
${{ github.workspace }}/packages/ui/dist/*.rpm
overwrite: true
release:
runs-on: ubuntu-latest
permissions: write-all
needs:
- build_on_linux
- build_on_macos
# - build_on_windows
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: geekgeekrun-ui@${{ github.sha }}
pattern: binary-geekgeekrun-ui-*
merge-multiple: true
- name: Display structure of downloaded files
run: ls -llR geekgeekrun-ui@${{ github.sha }}
- name: Create release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: geekgeekrun-ui@${{ github.sha }}/*
tag: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
body: TODO New Release.