Skip to content

chore: add dev publish and enforce target branch workflows#818

Merged
max246 merged 2 commits intobropat:developfrom
lenoxys:chore/dev-publish-workflow
Feb 26, 2026
Merged

chore: add dev publish and enforce target branch workflows#818
max246 merged 2 commits intobropat:developfrom
lenoxys:chore/dev-publish-workflow

Conversation

@lenoxys
Copy link
Copy Markdown
Contributor

@lenoxys lenoxys commented Feb 24, 2026

Adds two GitHub Actions workflows to improve the CI/CD pipeline.

1. Dev publish workflow (dev-publish.yml)

Automatically publishes dev pre-release builds to npm when code is pushed to the develop branch.

  • Publishes with the dev dist-tag (e.g. 3.7.2-dev.1, 3.7.2-dev.2, …)
  • Uses npm trusted publishing (OIDC) — no npm token needed
  • Runs build & tests before publishing
  • Version number increments automatically via github.run_number
  • Forks can publish under their own scoped package by setting the NPM_PACKAGE_NAME repository variable

2. Enforce target branch (enforce-target-branch.yml)

Automatically closes PRs that target master instead of develop, with a comment explaining how to fix it. PRs from develop to master (release merges) are allowed.

Prerequisites

  • Configure a trusted publisher on npmjs.com for the package, pointing to dev-publish.yml
  • Requires Node >= 22.14.0 / npm >= 11.5.1 (workflow uses Node 24)

@lenoxys
Copy link
Copy Markdown
Contributor Author

lenoxys commented Feb 24, 2026

before merging this PR, you will need access to npmjs repo and configured like that : https://www.npmjs.com/package/eufy-security-client/access
CleanShot 2026-02-24 at 14 37 47@2x

@lenoxys
Copy link
Copy Markdown
Contributor Author

lenoxys commented Feb 24, 2026

For extra protection, you can configured an environment name and lock auto publish for develop branch only

@lenoxys lenoxys changed the title chore: add dev publish workflow chore: add dev publish and enforce target branch workflows Feb 24, 2026
@lenoxys
Copy link
Copy Markdown
Contributor Author

lenoxys commented Feb 24, 2026

Added a second workflow (enforce-target-branch.yml) that auto-closes PRs targeting master with a comment guiding contributors to retarget develop. PRs from develop → master (release merges) are excluded.

@max246
Copy link
Copy Markdown
Collaborator

max246 commented Feb 26, 2026

For extra protection, you can configured an environment name and lock auto publish for develop branch only

dont have access to that :( Patrick didnt get back to me to give me more privilage other than merge into master

@max246 max246 merged commit 9ec980b into bropat:develop Feb 26, 2026
2 checks passed
@lenoxys
Copy link
Copy Markdown
Contributor Author

lenoxys commented Feb 26, 2026

Sure ! Looks good now !

thanks !!
CleanShot 2026-02-26 at 14 48 08@2x

@lenoxys lenoxys deleted the chore/dev-publish-workflow branch February 26, 2026 22:48
@max246
Copy link
Copy Markdown
Collaborator

max246 commented Feb 26, 2026

Will look at your other prs, sorry keep jumping around stuff and cleaning up pr+tickets

@max246 max246 mentioned this pull request Mar 1, 2026
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.

2 participants