diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml index f45a04513f..f93a134cf0 100644 --- a/.github/workflows/publish-to-npm.yml +++ b/.github/workflows/publish-to-npm.yml @@ -14,21 +14,30 @@ jobs: if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" name: Make a release and publish to NPM - steps: - uses: actions/checkout@v3 - - - name: Prepare repository - run: git fetch --unshallow --tags + with: + fetch-depth: 0 - uses: actions/setup-node@v3 with: registry-url: 'https://registry.npmjs.org' + cache: 'yarn' + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Install Node dependencies run: yarn --frozen-lockfile - - run: npm run release + - name: Build + run: yarn build + + - name: Check NPM deployment + run: ./scripts/check-npm.sh + + - name: Create release + run: npm run shipit env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/release-docs-and-schema.yml b/.github/workflows/release-docs-and-schema.yml index 10e1be7247..6888cda26b 100644 --- a/.github/workflows/release-docs-and-schema.yml +++ b/.github/workflows/release-docs-and-schema.yml @@ -39,13 +39,6 @@ jobs: env: GH_PAT: ${{ secrets.GH_PAT }} - - name: Check NPM deployment - run: ./scripts/check-npm.sh - - - uses: actions/setup-node@v3 - with: - registry-url: 'https://registry.npmjs.org' - - name: Prebuild website run: yarn predeploy:site diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c1f1946f9..0abc5d3167 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: pull_request: jobs: - test-matrix: + test: name: Node runs-on: ubuntu-latest diff --git a/package.json b/package.json index a684dd3aa6..4327d485de 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,8 @@ "watch:site": "yarn build:site -w", "watch:test": "yarn jest --watch test/", "watch:test:runtime": "NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json", - "release": "yarn run prebuild && yarn build && auto shipit" + "release": "yarn run prebuild && yarn build && yarn shipit", + "shipit": "auto shipit" }, "repository": { "type": "git",