You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/background/theory.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,13 @@ This project should help maintainers reduce toil and save time in the release pr
13
13
- Dry run publish on CI
14
14
- Revert to Dev version after release (optional)
15
15
16
+
## Security
17
+
18
+
We strive to use the most secure release practices possible, reflected in the `Checklist for Adoption`
19
+
and the example workflows.
20
+
This includes using PyPI Trusted Publishing, using GitHub Environments, encouraging the use of Rulesets and GitHub Apps with limited bypass capability, and provenance data for npm.
21
+
In addition, there is an automatic check for whether the user who triggered the action is an admin.
22
+
16
23
## Action Details
17
24
18
25
Detailed workflows are available to draft a changelog, draft a release, publish a release, and check a release.
Copy file name to clipboardExpand all lines: docs/source/how_to_guides/convert_repo_from_repo.md
+33-19Lines changed: 33 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,26 +16,32 @@ See checklist below for details:
16
16
17
17
## Checklist for Adoption
18
18
19
-
-[ ] Add a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), preferably from a "machine user" GitHub
20
-
account that has admin access to the repository. The token itself will
21
-
need "public_repo", and "repo:status" permissions. Save the token as
22
-
`ADMIN_GITHUB_TOKEN`
23
-
in the [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository). We need this
24
-
access token to allow for branch protection rules, which block the pushing
25
-
of commits when using the `GITHUB_TOKEN`, even when run from an admin user
26
-
account.
19
+
-[ ] Set up a [GitHub App](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps#github-apps-that-act-on-their-own-behalf) on your organization (or personal account for a personal project).
20
+
21
+
- Disable the web hook
22
+
- Enable Repository permissions > Contents > Read and write
23
+
- Select "Only on this account"
24
+
- Click "Create GitHub App"
25
+
- Browse to the App Settings
26
+
- Select "Install App" and install on all repositories
27
+
- Under "General" click "Generate a private key"
28
+
- Store the `APP_ID` and the private key in a secure location (Jupyter Vault if using a Jupyter Org)
29
+
30
+
-[ ] Create a "release" [environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment) on your repository and add an `APP_ID` Environment Variable and `APP_PRIVATE_KEY` secret.
31
+
The environment should be enabled for ["Protected branches only"](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-branches-and-tags).
32
+
33
+
-[ ] Configure [Rulesets](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets) for the repository
34
+
35
+
- Set up branch protection (with default rules) on publication branches
- Add access token for the [PyPI registry](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#saving-credentials-on-github) stored as `PYPI_TOKEN`.
33
-
_Note_ For security reasons, it is recommended that you scope the access
34
-
to a single repository. Additionally, this token should belong to a
- Add access token for the [PyPI registry](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#saving-credentials-on-github) stored as `PYPI_TOKEN`.
57
+
_Note_ For security reasons, it is recommended that you scope the access
58
+
to a single repository. Additionally, this token should belong to a
59
+
machine account and not a user account.
60
+
61
+
</details>
62
+
48
63
-[ ] If needed, add access token for [npm](https://docs.npmjs.com/creating-and-viewing-access-tokens), saved as `NPM_TOKEN`. Again this should
49
64
be created using a machine account that only has publish access.
50
-
-[ ] Ensure that only trusted users with 2FA have admin access to the
51
-
repository, since they will be able to trigger releases.
65
+
-[ ] Ensure that only trusted users with 2FA have admin access to the repository, since they will be able to trigger releases.
52
66
-[ ] Switch to Markdown Changelog
53
67
- We recommend [MyST](https://myst-parser.readthedocs.io/en/latest/?badge=latest), especially if some of your docs are in reStructuredText.
54
68
- Can use `pandoc -s changelog.rst -o changelog.md` and some hand edits as needed.
0 commit comments