Skip to content

Commit

Permalink
👷 release app
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangWeixian committed Jan 21, 2024
1 parent 0798aca commit c33a104
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["vsit-client", "vsit-monorepo"]
"ignore": ["vsit-monorepo"]
}
5 changes: 5 additions & 0 deletions .changeset/stupid-actors-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vsit/client": patch
---

publish @vsit/client
40 changes: 39 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
CI: true
jobs:
version:
release:
timeout-minutes: 15
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -52,3 +52,41 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
release-app:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: install dependencies
run: pnpm install --frozen-lockfile=false
- name: create and publish versions
run:
pnpm ci:publish:electron
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
"play:electron": "pnpm --filter=./packages/client dev:electron",
"preview": "pnpm --filter=./packages/vsit preview",
"build:cli": "pnpm --filter=./packages/vsit build",
"build:client": "pnpm --filter=./packages/client build",
"build:web": "pnpm --filter=./packages/client build",
"build:electron": "pnpm --filter=./packages/client build:electron",
"build:copy": "esno ./scripts/client.ts",
"build": "pnpm --filter=./packages/** run build && pnpm run build:copy",
"ci:publish:electron": "pnpm --filter=./packages/client publish:electron",
"ci:publish": "pnpm run build && pnpm changeset publish",
"ci:version": "pnpm changeset version",
"ci:snapshot": "pnpm changeset version --snapshot snapshot",
Expand Down
16 changes: 11 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "vsit-client",
"name": "@vsit/client",
"version": "0.0.0",
"type": "module",
"private": true,
"description": "vsit client",
"keywords": [
"vsit",
Expand All @@ -27,10 +26,11 @@
"test": "echo test",
"vitest": "echo test",
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"dev:electron": "vite --config ./vite.config.electron.mts",
"build": "vite build",
"build:electron": "vite build --config ./vite.config.electron.mts && electron-builder",
"publish:electron": "vite build --config ./vite.config.electron.mts && electron-builder --publish=always",
"preview": "vite preview",
"preview:electron": "vite preview --config ./vite.config.electron.mts"
},
"dependencies": {
Expand Down Expand Up @@ -66,6 +66,7 @@
"electron-builder": "^24.6.3",
"focus-if-need": "^0.1.0",
"lodash-es": "^4.17.21",
"npm-run-all": "^4.1.5",
"postcss": "8.4.31",
"prettier": "^3.0.0",
"react": "^18.2.0",
Expand All @@ -87,6 +88,11 @@
"workbox-window": "7.0.0"
},
"build": {
"productName": "vsit"
"productName": "vsit",
"publish": {
"provider": "github",
"owner": "vsit",
"repo": "vsit"
}
}
}
1 change: 0 additions & 1 deletion packages/vsit/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export default defineConfig([
},
{
plugins: [
// TODO: condition field order is not correct
ce({
outDir: 'dist',
declarationDir: 'dts',
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c33a104

Please sign in to comment.