Add files via upload #57
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: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| HUSKY: 0 | |
| jobs: | |
| main: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "16" | |
| cache: "yarn" | |
| # This doesn't just set the registry url, but also sets | |
| # the right configuration in .npmrc that reads NPM token | |
| # from NPM_AUTH_TOKEN environment variable. | |
| # It actually creates a .npmrc in a temporary folder | |
| # and sets the NPM_CONFIG_USERCONFIG environment variable. | |
| registry-url: https://registry.npmjs.org | |
| - name: Derive appropriate SHAs for base and head for `nx affected` commands | |
| uses: nrwl/nx-set-shas@v2 | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Setup git config | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "-" | |
| - name: Check npm credentials | |
| run: npm whoami | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| # Use npm instead of yarn because yarn automagically sets NPM_* environment variables | |
| # like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file | |
| # which is set up by `setup-node` action. | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| npx nx affected --target version --parallel=1 |