Skip to content

Commit

Permalink
modify the package.json inside the tgz file
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-paulger-sonarsource committed Aug 1, 2024
1 parent 08bbb3c commit b3841b1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,25 @@ jobs:
flat-download: true
download-checksums: false

- name: Update package version
- name: Extract .tgz package
working-directory: ${{ steps.local_repo.outputs.dir }}
run: |
file=$(find . -name "*.tgz" -printf "%f")
mkdir package
tar -xzf "$file" -C package --strip-components=1
- name: Update package version
working-directory: ${{ steps.local_repo.outputs.dir }}/package
run: npm version --no-git-tag-version ${{ steps.get_version.outputs.version }}

- name: Verify package version
working-directory: ${{ steps.local_repo.outputs.dir }}
working-directory: ${{ steps.local_repo.outputs.dir }}/package
run: cat package.json

- name: Repackage .tgz
working-directory: ${{ steps.local_repo.outputs.dir }}/package
run: npm pack

- name: Publish npm package to npmjs
working-directory: ${{ steps.local_repo.outputs.dir }}
env:
Expand Down

0 comments on commit b3841b1

Please sign in to comment.