diff --git a/.github/workflows/publish-next.yml b/.github/workflows/publish-next.yml index e90993d4..25d3546c 100644 --- a/.github/workflows/publish-next.yml +++ b/.github/workflows/publish-next.yml @@ -24,10 +24,19 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts - - name: Bump Version & Publish + - name: Bump version + run: npx standard-version + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + + - name: Deprecate old versions + run: npm deprecate discord-api-types@"~$(jq --raw-output '.version' package.json)-next" "No longer supported. Install the latest @next release" || true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + + - name: Publish new version run: | - npx standard-version - npm version --git-tag-version=false $(jq --raw-output '.version' package.json)-next.$(git rev-parse --verify HEAD) + npm version --git-tag-version=false $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s) npm publish --tag next || true env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}