Clean up current "Build" step #4
Workflow file for this run
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 | |
# TODO change this trigger later | |
on: | |
pull_request: | |
branches: | |
- main | |
env: | |
NPM_TOKEN: ${{ secrets.CLPLAYERS_NPM_TOKEN_RW }} | |
# VERSION: ${{ github.event.release.tag_name }} | |
VERSION: 0.7.7 | |
jobs: | |
publish-to-npm: | |
name: Publish to NPM | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
- name: Write NPM RC | |
run: | | |
echo '@castlabs:registry=https://registry.npmjs.org' > .npmrc | |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> .npmrc | |
- name: Overwrite package.json Version | |
uses: castlabs/ref-to-version-action@main | |
with: | |
versionFile: package.json | |
from-tag: ${{ env.VERSION }} | |
# TODO remove this debug | |
- name: Debug Echo Version | |
run: echo ${{ env.VERSION }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
# TODO NOT dry run | |
- name: Publish to NPM | |
run: npm publish --dry-run | |
- name: Job Summary | |
run: | | |
echo '### NPM Release' >> $GITHUB_STEP_SUMMARY | |
echo "Released \`@castlabs/prestoplay-react-components@${{ env.VERSION }}\` to NPM" >> $GITHUB_STEP_SUMMARY | |
# publish_api_docs: | |
# name: Publish API Docs | |
# runs-on: [ubuntu-latest] | |
# steps: |