Skip to content

Commit

Permalink
Update pipeline.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
youngbryanyu authored Jan 17, 2024
1 parent 177d942 commit 404967d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,20 @@ jobs:
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org/'
- name: Install pnpm
run: npm install -g pnpm
- name: Install Dependencies
run: pnpm install
- uses: actions/download-artifact@v4
with:
name: code-changes-artifact # get artifact containing whether there were code changes
- name: Read Code Changes Flag From Artifact
run: |
echo "CODE_CHANGES=$(cat code_changes.txt)" >> $GITHUB_ENV
- name: Install dependencies
run: npm install
- name: Get package version number
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: Build TypeScript into JavaScript build artifact
run: pnpm run build
- name: Publish to NPM # only run if there were code changes
if: env.CODE_CHANGES == 'true' && env.PACKAGE_VERSION
run: npm publish
Expand Down

0 comments on commit 404967d

Please sign in to comment.