Publish NPM Nightly #906
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 NPM Nightly | |
| on: | |
| schedule: | |
| - cron: '0 15 * * 1-5' | |
| jobs: | |
| deploy-npm-nightly: | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.CAP_GH_RELEASE_TOKEN }} | |
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 | |
| with: | |
| node-version: 20.x | |
| - name: Restore Dependency Cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.OS }}-dependency-cache-${{ hashFiles('**/package.json') }} | |
| - run: | | |
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc | |
| npm whoami | |
| yarn install | |
| - name: Version & Publish | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GH_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }} | |
| run: | | |
| git config user.name "Github Workflow (on behalf of ${{ github.actor }})" | |
| git config user.email "users.noreply.github.com" | |
| npm run ci:publish:nightly |