chore: release v1.7.10 #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
jobs: | |
release: | |
permissions: | |
id-token: write | |
contents: write | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
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 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
registry-url: "https://registry.npmjs.org" | |
- run: npx changelogithub | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: pnpm install | |
- run: pnpm run build | |
- name: publish to npm | |
if: matrix.os == 'windows-latest' | |
run: pnpm -r publish --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_CONFIG_PROVENANCE: true | |
- name: build vscode template | |
if: matrix.os == 'windows-latest' | |
run: pnpm run vscode:build-tpl | |
- name: rename vscode vsx | |
if: matrix.os == 'windows-latest' | |
# working-directory 用于指定在哪个目录下执行命令 | |
working-directory: ./packages/vscode | |
run: pnpm run build:rename | |
# https://github.com/HaaLeo/publish-vscode-extension | |
- name: build vscode vsx | |
if: matrix.os == 'windows-latest' | |
uses: HaaLeo/publish-vscode-extension@v1 | |
id: publishVSX | |
with: | |
packagePath: ./packages/vscode | |
pat: ${{ secrets.VSCODE_TOKEN }} | |
skipDuplicate: true | |
registryUrl: https://marketplace.visualstudio.com | |
yarn: false | |
- name: Build Electron App | |
run: pnpm electron:build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# https://github.com/softprops/action-gh-release | |
- name: release | |
uses: softprops/action-gh-release@v2.0.4 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: true | |
# prerelease: true | |
files: | | |
packages/web/dist/electron/latest*.yml | |
packages/web/dist/electron/*.AppImage | |
packages/web/dist/electron/*.deb | |
packages/web/dist/electron/*.dmg | |
packages/web/dist/electron/*.exe | |
packages/web/dist/electron/*.rpm | |
packages/web/dist/electron/*.zip | |
packages/vscode/*.vsix |