Add GitHub workflow for automatic publishing of assets to NPM#211
Add GitHub workflow for automatic publishing of assets to NPM#211yoeunes merged 1 commit intophp-flasher:2.xfrom
Conversation
| - name: Publish to NPM | ||
| run: npm publish --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
There was a problem hiding this comment.
@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