v1.1.6 #8
Workflow file for this run
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: "Publish to NPM" | |
| on: | |
| release: | |
| types: | |
| - "published" | |
| jobs: | |
| publish: | |
| name: Publish to NPM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| cache-dependency-path: ./yarn.lock | |
| cache: "yarn" | |
| node-version: 20 | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile --non-interactive | |
| - name: Build | |
| run: yarn build | |
| - name: Write release version | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| echo Version: $VERSION | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - run: "npm version ${VERSION} --no-git-tag-version" | |
| - name: Publish to NPM | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |