prerelease #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: prerelease | |
| on: workflow_dispatch | |
| jobs: | |
| release: | |
| environment: NPM | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.ADMIN_TOKEN }} | |
| - name: Install Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Configure Git | |
| run: | | |
| git config user.name "${{ secrets.ADMIN_NAME }}" | |
| git config user.email "${{ secrets.ADMIN_EMAIL }}" | |
| - name: Perform project installation | |
| run: yarn | |
| - name: Bump version | |
| run: yarn node ./apply-prerelease-version.mjs | |
| - name: Retrieve version from package.json | |
| id: package-version | |
| uses: martinbeentjes/npm-get-version-action@v1.3.1 | |
| - name: Commit and tag version | |
| run: | | |
| git add . | |
| git commit -m "[CI] Bump version to v${{ steps.package-version.outputs.current-version}}" | |
| git tag v${{ steps.package-version.outputs.current-version}} | |
| - name: Push | |
| run: | | |
| git push | |
| git push --tags | |
| - name: Prepare package | |
| run: yarn pack | |
| - name: Publish to NPM (next) | |
| run: npm publish package.tgz --tag next --provenance | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |