test publishing on github #27
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
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - "*" | |
| # tags: | |
| # - "v*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC (used for npm publish with Trusted publishing) | |
| packages: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: yarn | |
| - run: yarn install --pure-lockfile | |
| - run: yarn typecheck | |
| - run: yarn test | |
| - run: yarn build | |
| # - name: Publish | |
| # env: | |
| # NPM_CONFIG_PROVENANCE: true | |
| # run: | | |
| # npm publish --no-git-checks --access public --registry https://registry.npmjs.org | |
| - name: Publish on GitHub # Publish to GitHub Package Registry for internal usage | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc | |
| echo "always-auth=true" >> ~/.npmrc | |
| npm publish --no-git-checks --access restricted --registry https://npm.pkg.github.com |