Skip to content
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

Automate publish to npm #91

Closed
wants to merge 1 commit into from
Closed

Automate publish to npm #91

wants to merge 1 commit into from

Conversation

Pytal
Copy link
Contributor

@Pytal Pytal commented Jul 3, 2021

Add a workflow to publish this package to npm on release, also needs an NPM_TOKEN secret :)

Similar to the workflows as seen in the eslint-config and webpack-vue-config repos.

Signed-off-by: Christopher Ng <chrng8@gmail.com>
@juliushaertl
Copy link
Contributor

@skjnldsv @LukasReschke What is the state with npm tokens on repos inside this org these days? Wasn't this something we abandonded due to the large amount of people with push access?

@juliushaertl juliushaertl mentioned this pull request Jul 13, 2021
@Pytal
Copy link
Contributor Author

Pytal commented Jul 13, 2021

Drafting pending discussions :)

@Pytal Pytal marked this pull request as draft July 13, 2021 21:44
@LukasReschke
Copy link

Let's either use a locked down environment or if that isn't feasible the https://github.com/nextcloud-releases organization? :)

@Pytal
Copy link
Contributor Author

Pytal commented Jul 14, 2021

@ChristophWurst @juliushaertl @LukasReschke forked to https://github.com/nextcloud-releases/nextcloud-typings — as noted in nextcloud-libraries/nextcloud-password-confirmation#220 (review) we'll also have to set the secret token in the new repo or at the organization level :)

@Pytal Pytal closed this Jul 16, 2021
@ChristophWurst
Copy link
Contributor

But you still add the workflow here. Then we tag releases here and also push them over to the fork. Only in the forked repo the workflow should run. You could add something like an condition that the workflow only runs when the npm token is available.

@Pytal Pytal reopened this Jul 16, 2021
@skjnldsv
Copy link
Contributor

I think there is also a way to check the author permission level for the release in the github action.
Meaning we could deny if the level is not Admin or Owner

@Pytal
Copy link
Contributor Author

Pytal commented Jul 24, 2021

I think there is also a way to check the author permission level for the release in the github action.
Meaning we could deny if the level is not Admin or Owner

Couldn't find that in the docs 🤔 made a PR with @ChristophWurst's suggestion in the https://github.com/nextcloud/.github repo

@Pytal
Copy link
Contributor Author

Pytal commented Jul 24, 2021

Closing in favour of nextcloud/.github#14

@Pytal Pytal closed this Jul 24, 2021
@skjnldsv
Copy link
Contributor

Couldn't find that in the docs

That would be a workflow step, not from github's docs :)

@skjnldsv
Copy link
Contributor

Did a small PoC, Works fine!

image
image

I'll create a PR to the github action

@skjnldsv
Copy link
Contributor

@skjnldsv skjnldsv deleted the automate-publish branch February 23, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants