-
-
Notifications
You must be signed in to change notification settings - Fork 20
Add GitHub workflow for automatic publishing of assets to NPM #211
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
Conversation
| - name: Publish to NPM | ||
| run: npm publish --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yoeunes This requires setting the NPM_TOKEN in your Github repository secrets for actions.
|
@yoeunes I have tested this in ToshY#1 and I don't seem to have any issues. The workflow seems kind of straighforward and I did not have to change a lot compared to the example in the docs. Don't worry, I will delete the temporary packages I used for testing in ToshY#1 after this has been merged. Let me know if you have any further comments or remarks. |
|
@ToshY Thank you for your hard work on this |
|
Hey @yoeunes I just saw the release, but the action seems to have failed on the https://github.com/php-flasher/php-flasher/actions/runs/12965460260/job/36165208933 |
|
Thank you @ToshY |
Yes, i've added the NPM_TOKEN secret to the repository, i'm trying to figure out why this is failing |
|
Then not correctly it seems, as it's empty: https://github.com/php-flasher/php-flasher/actions/runs/12965460260/job/36165208933#step:5:6 I've ran it in my own repo without problems: https://github.com/ToshY/php-flasher/actions/runs/12965779640/job/36165867881#step:5:6 Did you add it under "Secrets and variables" > "Actions" > "Repository secrets"? |
|
Oh my bad, thank you |
No problem. When you've added it, re-run the failed workflow and it should be fine 👍 |
|
@yoeunes Reminder to add/update the |
|
Hello @ToshY , can you install the v2 from npm as i published it from my local machine, i will try to remove the 2FA which is blocks the github workflow right now |
Tested, works. |

What does this PR do?
Adds GitHub workflow to automatically publish the JS assets to NPM on new releases. This feature allows the user to separately install the
@flasherJS libraries for2.xand allows containerized tools (like Dependabot) to install (and bump) depedencies without having to depend on assets of the underlying PHP libraryphp-flasher.Description of Task to be completed
ResourceManangerno longer allows nullablemain_script/root_script#208How should this be manually tested?
2.1.3.{ "dependencies": { "@flasher/flasher": "^2.1.3", "@flasher/flasher-sweetalert": "^2.1.3", } }flasher.yamladd config to explicitely disablemain_script,styles(and same for pluginsscriptsandstyles).sweetalert().Relevant Issues
ResourceManangerno longer allows nullablemain_script/root_script#208Background context
ResourceManangerno longer allows nullablemain_script/root_script#208Screenshots (Optional)
n/a
Dependencies
n/a