Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
NPM_TOKEN no longer lives on github. only aws auth is required for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
3p3r committed Feb 25, 2022
1 parent dd9624c commit f8f7566
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -36,6 +36,12 @@ jobs:
role-session-name: github-actions-cdk-web
aws-region: us-east-1

- name: setup npm
run: |
export NODE_AUTH_TOKEN=$(aws --output json ssm get-parameter --name /github-actions/npm-token | jq -r ".Parameter.Value")
echo "NODE_AUTH_TOKEN=$NODE_AUTH_TOKEN" >> $GITHUB_ENV
echo "::add-mask::$NODE_AUTH_TOKEN"
- name: installing dependencies
run: npm install

Expand All @@ -54,8 +60,6 @@ jobs:
- name: releasing on NPM (cdk-web - with dependencies)
if: ${{ !env.ACT && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: releasing on NPM (aws-cdk-web - without dependencies)
if: ${{ !env.ACT && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
Expand All @@ -75,8 +79,6 @@ jobs:
npm publish
popd
rm -rf aws-cdk-web
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: tagging a new release on Git
if: ${{ !env.ACT && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
Expand Down

0 comments on commit f8f7566

Please sign in to comment.