Publish NPM packages #31
This file contains 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: Publish NPM packages | |
on: | |
workflow_dispatch: | |
jobs: | |
release-packages: | |
runs-on: ubuntu-latest | |
name: Release packages | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.IMJS_ADMIN_GH_TOKEN }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 7.33.2 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.16.0 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm run build | |
- name: Lint | |
run: pnpm run lint | |
- name: Test | |
run: pnpm run test | |
- name: Publish packages | |
run: | | |
git config --local user.email [email protected] | |
git config --local user.name imodeljs-admin | |
pnpm publish-packages -y --branch ${{ github.ref_name }} --message "Version bump [skip actions][publish docs]" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_ITWIN }} |