diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c66d61d..5ddec7e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: + registry-url: 'https://registry.npmjs.org' # to create .npmrc file with NODE_AUTH_TOKEN node-version: 18 - name: Install Dependencies run: yarn install @@ -33,3 +34,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }} + - name: Publish next snapshot + if: steps.changesets.outputs.published != 'true' + run: | + yarn changeset version --snapshot next + yarn changeset publish --no-git-tag --snapshot --tag next + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }} diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml deleted file mode 100644 index 5cf4dda..0000000 --- a/.github/workflows/snapshot-release.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "Snapshot Release@next" - -on: - push: - branches: - - master - -permissions: - contents: read - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits - fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - registry-url: 'https://registry.npmjs.org' # to create .npmrc file with NODE_AUTH_TOKEN - node-version: 18 - - name: Install Dependencies - run: yarn install - - name: "Release @next" - run: | - yarn changeset version --snapshot next - yarn changeset publish --no-git-tag --snapshot --tag next - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }}