diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..211ee0b7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Test + +on: + push: + tags: + - "v*" + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + - name: Install packages + run: pnpm i --ignore-scripts + - name: Release check&build + run: pnpm check + - name: Setup npm auth + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" >> ~/.npmrc + npm whoami + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Registry release + run: pnpm publish -r --ignore-scripts --access public --filter "@location-state/*" + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 2d8aa5d2..ea5d6c02 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "location-state", + "private": true, "version": "0.0.0-alpha", "description": "A lightweight state management library that saves and restores state based on history.", - "main": "index.js", "engines": { "pnpm": "8.x", "npm": "please_use_pnpm_instead" diff --git a/packages/location-state-core/package.json b/packages/location-state-core/package.json index 96b414dc..22088b23 100644 --- a/packages/location-state-core/package.json +++ b/packages/location-state-core/package.json @@ -1,6 +1,10 @@ { "name": "@location-state/core", "version": "0.0.0-alpha", + "publishConfig": { + "access": "public" + }, + "repository": "https://github.com/recruit-tech/location-state", "files": [ "dist", "types", diff --git a/packages/location-state-next/package.json b/packages/location-state-next/package.json index bd8da7c1..45171178 100644 --- a/packages/location-state-next/package.json +++ b/packages/location-state-next/package.json @@ -1,6 +1,10 @@ { "name": "@location-state/next", "version": "0.0.0-alpha", + "publishConfig": { + "access": "public" + }, + "repository": "https://github.com/recruit-tech/location-state", "files": [ "dist", "types", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 1fb25dbf..9d872cd9 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,5 +1,6 @@ { "name": "test-utils", + "version": "0.0.0", "private": true, "main": "./src/index.ts", "types": "./src/index.ts",