mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 16:51:34 +03:00
ci: add release.yml
This commit is contained in:
parent
c4e90f2d8b
commit
e399682cad
19
.github/workflows/release.yml
vendored
Normal file
19
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Publish npm release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Try publishing to NPM
|
||||
run: ./scripts/publish.sh
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
@ -2,7 +2,7 @@ nmMode: hardlinks-local
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
npmAuthToken: '${NODE_AUTH_TOKEN:-NONE}'
|
||||
npmAuthToken: '${NPM_TOKEN:-NONE}'
|
||||
|
||||
npmPublishAccess: public
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.umd.cjs",
|
||||
"module": "dist/index.js",
|
||||
"exports": {
|
||||
|
18
scripts/publish.sh
Executable file
18
scripts/publish.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
packages=(
|
||||
"y-indexeddb"
|
||||
)
|
||||
|
||||
for package in "${packages[@]}"; do
|
||||
cd "packages/$package"
|
||||
yarn build
|
||||
|
||||
if [ "$NIGHTLY" = "true" ]; then
|
||||
yarn npm publish --no-git-checks --tag nightly
|
||||
else
|
||||
yarn npm publish
|
||||
fi
|
||||
|
||||
cd ../../
|
||||
done
|
Loading…
Reference in New Issue
Block a user