impr auto publish for npm
This commit is contained in:
parent
038dfc415b
commit
2e93e90d28
2 changed files with 7 additions and 2 deletions
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
|
|
@ -33,12 +33,16 @@ jobs:
|
|||
pnpx zardoy-release node --footer "This release URL: ${{ steps.deploy.outputs.stdout }}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# has possible output: tag
|
||||
id: release
|
||||
# has output
|
||||
- run: cp vercel.json .vercel/output/static/vercel.json
|
||||
- uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: .vercel/output/static
|
||||
force_orphan: true
|
||||
- run: pnpm tsx scripts/buildNpmReact.ts
|
||||
- run: pnpm tsx scripts/buildNpmReact.ts ${{ steps.release.outputs.tag }}
|
||||
if: steps.release.outputs.tag
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ fs.promises.readdir(path.resolve(__dirname, '../src/react')).then(async (files)
|
|||
const packageJsonRoot = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../package.json'), 'utf-8'))
|
||||
const external = Object.keys(packageJson.peerDependencies)
|
||||
const dependencies = new Set<string>()
|
||||
const version = packageJsonRoot.version
|
||||
let version = process.argv[2] || packageJsonRoot.version
|
||||
version = version.replace(/^v/, '')
|
||||
packageJson.version = version
|
||||
|
||||
const externalize = ['minecraft-assets', 'prismarine-viewer']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue