Clean up current "Build" step #10
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: Set Package Version | |
# run: npm --no-git-tag-version --allow-same-version version ${{ env.VERSION }} | |
# # TODO remove this debug | |
# - name: Debug Echo Version | |
# run: echo ${{ env.VERSION }} | |
# # TODO remove this debug | |
# - name: Debug Cat package.json | |
# run: cat package.json | |
# - 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 version ${{ env.VERSION }} of https://www.npmjs.com/package/@castlabs/prestoplay-react-components" >> $GITHUB_STEP_SUMMARY | |
publish-api-docs: | |
name: Publish API Docs | |
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 | |
# TODO remove this debug | |
- name: Debug Echo Version | |
run: echo ${{ env.VERSION }} | |
# - name: Debug pwd | |
# run: pwd | |
# - name: Debug CAT package.json | |
# run: cat package.json | |
# - name: Debug Lint | |
# run: npm run lint | |
# - name: Debug Storybook help | |
# run: npm run storybook-help | |
- name: Build Storybook | |
run: npm run build-storybook | |
# # TODO remove this debug | |
# - name: Debug Echo target bucket | |
# run: echo "s3://players-castlabs-com-root/react-dom/${{ env.VERSION }}/" | |
# - name: Debug List Dist | |
# run: ls -la ./dist/storybook | |
# # TODO how does not work, does the repo need to be registered to be | |
# # able to assume that role or what? | |
# - name: Assume AWS role | |
# uses: aws-actions/configure-aws-credentials@v1-node16 | |
# with: | |
# role-to-assume: arn:aws:iam::068037490145:role/prestoplay-web-web-uploader | |
# aws-region: us-east-1 | |
# Is there a dry run? Let's perhaps try version 0.0.1 | |
# - name: Upload to S3 | |
# run: aws s3 cp --recursive “./dist/storybook "s3://players-castlabs-com-root/react-dom/${{ env.VERSION }}/" | |
# Let’s keep the default cache policy which is 1 day | |
# This will publish to https://players.castlabs.com/react-dom (I hope) |