Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: NPM Package
name: Release

on:
push:
Expand All @@ -14,8 +14,6 @@ jobs:
with:
fetch-depth: 0

- run: npm install

- name: Extract version
id: version
run: |
Expand All @@ -30,17 +28,14 @@ jobs:
exit 1
fi
- name: Publish to NPM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of directly publishing wouldn't make sense to create bundled artifacts to be added to the release in some .zip that could be later on uploaded to npm with all security measures? Instead having to bundle again in local computer without the guarantee of bundling the expected version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally don't mind building locally but it could be an option.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this would minimize other issues like using the wrong commit or forgetting to run npm install before bundling it locally again. I think this is one important value of CI automated systems

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, it could be more robust. Could be a future improvement. Can we merge this PR as is though, for now?
The API key won't work anymore after Richard's changes.

uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}

- name: Create a git tag
if: success()
run: git tag $NEW_VERSION && git push --tags
env:
NEW_VERSION: ${{ steps.version.outputs.version }}

- name: GitHub release
if: success()
uses: actions/create-release@v1
id: create_release
with:
Expand Down