-
Notifications
You must be signed in to change notification settings - Fork 0
dx | 2326 npm publish #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
aaaa402
chore: enhance GitHub Actions workflow for npm package release process
harshithad0703 22245b7
fix: update version to 1.0.16-beta in package.json and package-lock.json
harshithad0703 d519996
test release on npm
harshithad0703 b3b54b7
fix: downgrade GitHub Actions to v1 for create-release and upload-rel…
harshithad0703 f9553d1
test npm publish2
harshithad0703 7cfaa08
unpublish the pkg
harshithad0703 61a3b22
unpublish beta version
harshithad0703 3937cbb
npm publish 3
harshithad0703 cfac275
removed unpublish workflow
harshithad0703 239b0ba
add checkout step to release workflow
harshithad0703 69540e8
set npm publish access to public
harshithad0703 c210fb2
bump version to 1.0.16-beta.2 and update asset paths in release workflow
harshithad0703 c16e6cf
bump version to 1.0.16 and update release workflow to trigger on mast…
harshithad0703 97a511e
update release workflow comment for npm publish access
harshithad0703 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,43 +8,65 @@ jobs: | |
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| # Checkout the repository | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22.x" | ||
| - run: npm install | ||
|
|
||
| - name: get-package-details | ||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Get package details | ||
| id: package | ||
| uses: codex-team/[email protected] | ||
| - name: install npm packall | ||
|
|
||
| - name: Install npm-pack-all | ||
| run: npm install npm-pack-all | ||
|
|
||
| - run: node node_modules/.bin/npm-pack-all | ||
| - uses: Klemensas/action-autotag@stable | ||
| - name: Pack the npm package | ||
| run: npx npm-pack-all | ||
|
|
||
| # Publish package to npm | ||
| - name: Publish to npm | ||
| id: publish_npm | ||
| uses: JS-DevTools/npm-publish@v3 | ||
| with: | ||
| token: ${{ secrets.NPM_TOKEN }} | ||
| # access: public # Uncomment this line if you want to publish the package as public for first time | ||
|
|
||
| # Auto-tag new version | ||
| - name: Auto-tag new version | ||
| id: update_tag | ||
| uses: Klemensas/action-autotag@stable | ||
| with: | ||
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| tag_prefix: "v" | ||
| - name: Create Release | ||
| if: steps.update_tag.outputs.tagname | ||
| uses: actions/create-release@v4 | ||
|
|
||
| # Create GitHub Release | ||
| - name: Create GitHub Release | ||
| if: steps.update_tag.outputs.tagname != '' | ||
| uses: actions/create-release@v1 | ||
| id: create_release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| tag_name: ${{ steps.update_tag.outputs.tagname }} | ||
| release_name: Release ${{ steps.update_tag.outputs.tagname }} | ||
| draft: false # Default value, but nice to set explicitly | ||
| prerelease: false # Default value, but nice to set explicitly | ||
| draft: false | ||
| prerelease: false | ||
|
|
||
| # Upload release asset | ||
| - name: Upload Release Asset | ||
| if: steps.update_tag.outputs.tagname | ||
| id: upload-release-asset | ||
| uses: actions/upload-release-asset@v4 | ||
| if: steps.update_tag.outputs.tagname != '' | ||
| uses: actions/upload-release-asset@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
| asset_path: ./${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz | ||
| asset_name: ${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz | ||
| upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
| asset_path: "./contentstack-datasync-filesystem-sdk-${{ steps.package.outputs.version }}.tgz" | ||
| asset_name: "contentstack-datasync-filesystem-sdk-${{ steps.package.outputs.version }}.tgz" | ||
| asset_content_type: application/tgz | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.