Skip to content

fix: 收藏封面显示 #12

fix: 收藏封面显示

fix: 收藏封面显示 #12

Workflow file for this run

name: Pre Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+
branches:
- master
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
# os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Check out git repository
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- id: pkgversion
uses: ashley-taylor/read-json-property-action@v1.2
with:
path: ./package.json
property: version
- id: short_sha
run: echo "::set-output name=value::$(git rev-parse --short HEAD)"
- run: pnpm install
- run: pnpm run build
- run: pnpm run vscode:build-tpl
- name: rename vscode vsx
# working-directory 用于指定在哪个目录下执行命令
working-directory: ./packages/vscode
run: pnpm run build:rename
# https://github.com/HaaLeo/publish-vscode-extension
- name: build vscode vsx
uses: HaaLeo/publish-vscode-extension@v1
id: publishVSX
with:
packagePath: ./packages/vscode
pat: ${{ secrets.VSCODE_TOKEN }}
# 不发布
dryRun: true
skipDuplicate: true
registryUrl: https://marketplace.visualstudio.com
yarn: false
- name: Build Electron App
run: pnpm electron:build
# env:
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Cleanup Artifacts for Windows
if: matrix.os == 'windows-latest'
run: |
npx rimraf "packages/web/dist/electron/!(*.exe)"
# - name: Cleanup Artifacts for MacOS
# if: matrix.os == 'macos-latest'
# run: |
# npx rimraf "packages/web/dist/electron/!(*.dmg)"
# https://github.com/actions/upload-artifact
- name: upload artifacts
uses: actions/upload-artifact@v3.0.0
with:
name: ${{ matrix.os }}
path: |
${{ steps.publishVSX.outputs.vsixPath }}
packages/web/dist/electron
# https://github.com/softprops/action-gh-release
- name: release
uses: softprops/action-gh-release@v2.0.4
with:
tag_name: v${{ steps.pkgversion.outputs.value }}-alpha.${{ steps.short_sha.outputs.value }}
name: v${{ steps.pkgversion.outputs.value }}-alpha.${{ steps.short_sha.outputs.value }}
prerelease: trues
draft: true
files: |
packages/web/dist/electron/**
packages/vscode/*.vsix
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}