Skip to content

Commit

Permalink
Switch from npm to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee committed Dec 13, 2024
1 parent 10dca80 commit 28be5d6
Show file tree
Hide file tree
Showing 6 changed files with 2,718 additions and 3,704 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,19 @@ jobs:
with:
persist-credentials: false

- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: '20'

- run: npm ci
- run: pnpm install --frozen-lockfile

- run: npm run lint
- run: pnpm run lint

- run: npm run build
- run: pnpm run build

- run: npm run package
- run: pnpm run package

- name: Upload artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,24 @@ jobs:
with:
persist-credentials: false

- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: '20'

- run: npm ci
- run: pnpm install --frozen-lockfile

- run: npm run lint
- run: pnpm run lint

- run: npm run build
- run: pnpm run build

- run: |
#!/usr/bin/env bash
set -euo pipefail
current_version=$(\
npm exec tfx extension show -- --publisher JamieMagee --extension-id scorecard --trace-level none --token ${{ secrets.AZURE_MARKETPLACE_TOKEN }} | \
pnpm exec tfx extension show -- --publisher JamieMagee --extension-id scorecard --trace-level none --token ${{ secrets.AZURE_MARKETPLACE_TOKEN }} | \
jq -r '.versions[0].version'
)
version_parts=(${current_version//./ })
Expand All @@ -64,7 +66,7 @@ jobs:
echo "new_version=$new_version" >> $GITHUB_OUTPUT
id: bump_version
- run: npm run package
- run: pnpm run package

- run: echo "filename=JamieMagee.scorecard-${{ steps.bump_version.outputs.new_version }}.vsix" >> $GITHUB_OUTPUT
id: set_filename
Expand Down Expand Up @@ -92,4 +94,4 @@ jobs:

- name: Publish to Azure Marketplace
run: |
npm exec tfx extension publish -- --token ${{ secrets.AZURE_MARKETPLACE_TOKEN }} --vsix ${{ steps.set_filename.outputs.filename }}
pnpm exec tfx extension publish -- --token ${{ secrets.AZURE_MARKETPLACE_TOKEN }} --vsix ${{ steps.set_filename.outputs.filename }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
dist/
package-lock.json
*.vsix
*.tar.gz
Loading

0 comments on commit 28be5d6

Please sign in to comment.