-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Selwyn edited this page May 30, 2023
·
2 revisions
Repository template with files to get started on an Open Source project.
- Create a new repository using this repository as a template and ☑️ include all branches.
- Clone the new repository and choose a starting point from the branches, for example:
git switch nodejs
. - Start with a clean git state:
rm -r .git
&git init
. - Go through the files replacing information with your project specifics.
-
git commit
&git push --force
🎉
The nodejs-package
branch contains a publish workflow to automatically publish the npm package. To setup the token:
- Create an access token for your package:
- Log into npmjs.com with De Voorhoede account.
- Open
https://npmjs.com/settings/$USERNAME/tokens/granular-access-tokens/new
. - Use the package name for the token name, a long expiry, 'Read and write' permissions, and pick the specific package that you're publishing.
- Add your token as a secret for your project's GitHub Actions
- Open
https://github.com/$USERNAME/$REPO/settings/secrets/actions/new
. - Set
NPM_PUBLISH_TOKEN
as the name. - Set the npm token from the previous step as the value.
- Open
- In the npm package's settings
https://www.npmjs.com/package/$PACKAGE_NAME/access
, allow publish without 2FA for granular/automation tokens only.