ci(npm): try to peek into ci's env for debugging #19
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 Packages to NPM | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ hashFiles('**/yarn.lock') }} | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install modules | |
run: yarn install --frozen-lockfile | |
# update npm for provenance support | |
- run: npm --version && npm install -g npm && npm --version | |
# make extra sure this publish wouldn’t break anything | |
- run: yarn run build check test | |
- run: cp internals/scripts/source/npmrc-template /home/runner/work/_temp/.npmrc | |
- name: publish | |
run: bun internals/scripts/source/publish.ts | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |