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

Use a PR for Release Commits #521

Closed
wants to merge 98 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
9e2a315
Use a PR for changes
blink1073 Aug 5, 2023
6d86832
move forwardport to the end
blink1073 Aug 5, 2023
ac7af52
tag the release
blink1073 Aug 5, 2023
235a120
fix cli
blink1073 Aug 5, 2023
97c5c30
debug
blink1073 Aug 6, 2023
9a0042c
install self
blink1073 Aug 6, 2023
adcf50b
install local
blink1073 Aug 6, 2023
c213bed
syntax
blink1073 Aug 6, 2023
ff4d590
fix handling of commit msg
blink1073 Aug 6, 2023
59662c4
pin version and debug
blink1073 Aug 6, 2023
a9cb41f
refactor
blink1073 Aug 6, 2023
3a5b97b
fix handling of pr branch
blink1073 Aug 6, 2023
feeb281
more debug
blink1073 Aug 6, 2023
f4023dd
clean up
blink1073 Aug 6, 2023
5e16dc4
more debug
blink1073 Aug 6, 2023
6ba182c
fix pr merge
blink1073 Aug 6, 2023
2515931
cleanup
blink1073 Aug 6, 2023
9611cd7
delete the old metadata file
blink1073 Aug 6, 2023
77d8351
fix tag push
blink1073 Aug 6, 2023
105b5c4
debugging
blink1073 Aug 6, 2023
05bc39e
try pip install using context variables
blink1073 Aug 6, 2023
cb85b38
debug
blink1073 Aug 6, 2023
fb1925a
debug
blink1073 Aug 6, 2023
e466d64
debug
blink1073 Aug 6, 2023
f81de30
debug
blink1073 Aug 6, 2023
128de0a
try this
blink1073 Aug 6, 2023
b0fbdca
more debug
blink1073 Aug 6, 2023
22139d5
remove admin check
blink1073 Aug 7, 2023
e6a9cd8
clean up
blink1073 Aug 7, 2023
1ac1722
fix tag handling
blink1073 Aug 7, 2023
7ad45bd
add mock pr merge
blink1073 Aug 7, 2023
572d3f1
more tag fixup
blink1073 Aug 7, 2023
5fa5733
fixup
blink1073 Aug 7, 2023
71851b4
use main as default branch
blink1073 Aug 7, 2023
17f19c6
add dry run arg
blink1073 Aug 7, 2023
dee0824
cleanup
blink1073 Aug 7, 2023
b80a978
cleanup
blink1073 Aug 8, 2023
77c7e5d
cleanup
blink1073 Aug 8, 2023
315135a
fix workflow
blink1073 Aug 8, 2023
0944cc5
cleanup
blink1073 Aug 8, 2023
6e45fdb
wip
blink1073 Aug 8, 2023
cbdc82e
fix
blink1073 Aug 8, 2023
48ab3b2
debug
blink1073 Aug 8, 2023
450e543
debug
blink1073 Aug 8, 2023
db018a9
wip
blink1073 Aug 8, 2023
a9166db
wip
blink1073 Aug 8, 2023
82ee603
fixup
blink1073 Aug 8, 2023
d8100e4
cleanup and docs
blink1073 Aug 8, 2023
4dbaac4
cleanup
blink1073 Aug 8, 2023
f90919d
wip
blink1073 Aug 8, 2023
a7ae87b
try fixing remote
blink1073 Aug 9, 2023
49b3770
clean up and add e2e test
blink1073 Aug 10, 2023
a085999
try -X theirs
blink1073 Aug 10, 2023
9e1f263
another try
blink1073 Aug 10, 2023
3474ce9
try again
blink1073 Aug 10, 2023
97d02d1
try again
blink1073 Aug 10, 2023
581b9d3
try again
blink1073 Aug 10, 2023
f0aa114
normalize handling of origin
blink1073 Aug 10, 2023
4da85fc
clean up dry run handling
blink1073 Aug 11, 2023
7db3736
cleanup
blink1073 Aug 11, 2023
084e5d2
fix handling of branch
blink1073 Aug 11, 2023
2a836ab
cleanup
blink1073 Aug 11, 2023
ab04f35
fix up install-releaser
blink1073 Aug 11, 2023
2600180
add script
blink1073 Aug 11, 2023
c0b4fc6
add shell
blink1073 Aug 11, 2023
170cea3
try again
blink1073 Aug 11, 2023
d5d5744
update tag and add end to end testing notes
blink1073 Aug 11, 2023
bf3d655
cleanup
blink1073 Aug 11, 2023
ce627e0
Update jupyter_releaser/lib.py
blink1073 Aug 11, 2023
9b8788b
fix function sig
blink1073 Aug 11, 2023
483ecd7
Merge branch 'use-pr-for-changes' of github.com:blink1073/jupyter_rel…
blink1073 Aug 11, 2023
d622a29
fix for check release
blink1073 Aug 11, 2023
b50d549
fix for check release
blink1073 Aug 11, 2023
0d277bc
try with ci skip
blink1073 Aug 12, 2023
243e74a
try auto merge
blink1073 Aug 12, 2023
3b5407a
fix auth
blink1073 Aug 12, 2023
ed951a7
fix wait behavior
blink1073 Aug 12, 2023
84bc2a6
try use a PAT for the PR
blink1073 Aug 13, 2023
3a2407c
debug
blink1073 Aug 13, 2023
4a73549
try repeated merge attempt
blink1073 Aug 13, 2023
0cdcfa3
fix err code check
blink1073 Aug 13, 2023
0b5c2ad
fix handling of merge
blink1073 Aug 13, 2023
2f0c174
fix tests
blink1073 Aug 13, 2023
c3d7834
fixup
blink1073 Aug 13, 2023
a46f2a1
try again
blink1073 Aug 13, 2023
33ded78
try again
blink1073 Aug 13, 2023
92f66d6
try again
blink1073 Aug 13, 2023
c2ec315
remove the ref
blink1073 Aug 13, 2023
567139c
try again
blink1073 Aug 13, 2023
cadd9db
cleanup
blink1073 Aug 14, 2023
f1e621f
add missing section
blink1073 Aug 14, 2023
93f6d55
debug
blink1073 Aug 14, 2023
9a930f8
attempt fix tag handling
blink1073 Aug 14, 2023
a3603e5
fix lookup
blink1073 Aug 14, 2023
cec21b5
fix tests
blink1073 Aug 14, 2023
022cba1
update docs and examples
blink1073 Sep 9, 2023
bf63e88
Merge branch 'use-pr-for-changes' of github.com:blink1073/jupyter_rel…
blink1073 Sep 9, 2023
0e70776
Merge branch 'main' into use-pr-for-changes
blink1073 Sep 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/actions/check-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@ inputs:
runs:
using: "composite"
steps:
- shell: bash -eux {0}
id: install-releaser
- id: install-releaser
shell: bash
run: |
# Install Jupyter Releaser from git unless we are testing Releaser itself
if ! command -v jupyter-releaser &> /dev/null
then
pip install -q git+https://github.com/jupyter-server/jupyter_releaser.git@v2
fi
cd "${{ github.action_path }}/../../scripts"
bash install-releaser.sh

- id: prep-release
shell: bash -eux {0}
run: |
export RH_DRY_RUN="true"
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
export GITHUB_REF=""
export RH_VERSION_SPEC=${{ inputs.version_spec }}
export RH_STEPS_TO_SKIP=${{ inputs.steps_to_skip }}
python -m jupyter_releaser.actions.prep_release
Expand All @@ -37,6 +35,7 @@ runs:
run: |
export RH_DRY_RUN="true"
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
export GITHUB_REF=""
export RH_RELEASE_URL=${{ steps.prep-release.outputs.release_url }}
export RH_STEPS_TO_SKIP=${{ inputs.steps_to_skip }}
export YARN_UNSAFE_HTTP_WHITELIST=0.0.0.0
Expand All @@ -46,6 +45,7 @@ runs:
shell: bash -eux {0}
run: |
export RH_DRY_RUN="true"
export GITHUB_REF=""
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
export RH_RELEASE_URL=${{ steps.populate-release.outputs.release_url }}
export RH_STEPS_TO_SKIP=${{ inputs.steps_to_skip }}
Expand Down
13 changes: 7 additions & 6 deletions .github/actions/finalize-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
token:
description: "GitHub access token"
required: true
personal_access_token:
description: "GitHub PAT used to create pull requests"
required: false
target:
description: "The owner/repo GitHub target"
required: false
Expand Down Expand Up @@ -33,18 +36,16 @@ runs:
using: "composite"
steps:
- name: install-releaser
shell: bash -eux {0}
shell: bash
run: |
# Install Jupyter Releaser from git unless we are testing Releaser itself
if ! command -v jupyter-releaser &> /dev/null
then
pip install -q git+https://github.com/jupyter-server/jupyter_releaser.git@v2
fi
cd "${{ github.action_path }}/../../scripts"
bash install-releaser.sh

- id: finalize-release
shell: bash -eux {0}
run: |
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
export PERSONAL_ACCESS_TOKEN=${{ inputs.personal_access_token }}
export GITHUB_ACTOR=${{ github.triggering_actor }}
export RH_REPOSITORY=${{ inputs.target }}
export RH_DRY_RUN=${{ inputs.dry_run }}
Expand Down
8 changes: 2 additions & 6 deletions .github/actions/install-releaser/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ runs:
- shell: bash
id: install-releaser
run: |
set -eux
# Install Jupyter Releaser from git unless we are testing Releaser itself
if ! command -v jupyter-releaser &> /dev/null
then
pip install -q git+https://github.com/jupyter-server/jupyter_releaser.git@v2
fi
cd "${{ github.action_path }}/../../scripts"
bash install-releaser.sh
13 changes: 7 additions & 6 deletions .github/actions/populate-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ inputs:
token:
description: "GitHub access token"
required: true
personal_access_token:
description: "GitHub PAT used to create pull requests"
required: false
target:
description: "The owner/repo GitHub target"
required: false
Expand All @@ -30,18 +33,16 @@ runs:
using: "composite"
steps:
- name: install-releaser
shell: bash -eux {0}
shell: bash
run: |
# Install Jupyter Releaser from git unless we are testing Releaser itself
if ! command -v jupyter-releaser &> /dev/null
then
pip install -q git+https://github.com/jupyter-server/jupyter_releaser.git@v2
fi
cd "${{ github.action_path }}/../../scripts"
bash install-releaser.sh

- id: populate-release
shell: bash -eux {0}
run: |
export GITHUB_ACCESS_TOKEN=${{ inputs.token }}
export PERSONAL_ACCESS_TOKEN=${{ inputs.personal_access_token }}
export GITHUB_ACTOR=${{ github.triggering_actor }}
export RH_REPOSITORY=${{ inputs.target }}
export RH_DRY_RUN=${{ inputs.dry_run }}
Expand Down
9 changes: 3 additions & 6 deletions .github/actions/prep-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ runs:
using: "composite"
steps:
- name: install-releaser
shell: bash -eux {0}
shell: bash
run: |
# Install Jupyter Releaser from git unless we are testing Releaser itself
if ! command -v jupyter-releaser &> /dev/null
then
pip install -q git+https://github.com/jupyter-server/jupyter_releaser.git@v2
fi
cd "${{ github.action_path }}/../../scripts"
bash install-releaser.sh

- id: prep-release
shell: bash -eux {0}
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/bump_tag.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set -eux

# Update the v1 tag for GitHub Actions consumers
# Update the stable tag for GitHub Actions consumers
if [[ ${RH_DRY_RUN:=true} != 'true' ]]; then
git tag -f -a v2 -m "Github Action release"
git tag -f -a v3 -m "Github Action release"
git push origin -f --tags
fi
10 changes: 10 additions & 0 deletions .github/scripts/install-releaser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set -eux
# Install Jupyter Releaser if it is not already installed

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

if ! command -v jupyter-releaser &> /dev/null
then
cd "${SCRIPT_DIR}/../.."
pip install -e .
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ dmypy.json
# Pyre type checker
.pyre/

# Local git checkout
# Local git checkouts
.jupyter_releaser_checkout
.jupyter_release_bare_repo

# macOS
.DS_Store
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,12 @@ To run the Python tests, use:
```bash
pytest
```

## End to End Verification Testing

If you're making substantial changes, you may want to test the release workflow
on a test repo that uses `TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/`.

Update the actions on that repo to point to your releaser fork and branch, e.g.

`uses: blink1073/jupyter_releaser/.github/actions/populate-release@use-pr-for-changes`
5 changes: 3 additions & 2 deletions docs/source/background/theory.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ Detailed workflows are available to draft a changelog, draft a release, publish
- Builds tarball(s) using `npm pack`
- Make sure tarball(s) can be installed and imported in a new npm package
- Adds a commit that includes the hashes of the dist files
- Creates an annotated version tag in standard format
- If given, bumps the version using the post version spec. he post version
spec can also be given as a setting, [Write Releaser Config Guide](../how_to_guides/write_config.md).
- Verifies that the SHA of the most recent commit has not changed on the target
branch, preventing a mismatch of release commit.
- Pushes the commits and tag to the target `branch`
- Creates a Pull Request with the release and optional post version commit and
automatically merges the PR.
- Pusehes the created assets to the draft release, along with an `asset_shas.json` file capturing the checksums of the files.

### Finalize Release Action
Expand All @@ -61,6 +61,7 @@ Detailed workflows are available to draft a changelog, draft a release, publish
- Downloads the dist assets from the release
- Verifies shas of release assets against the `asset_shas.json` file.
- Publishes assets to appropriate registries.
- Creates an annotated version tag in standard format and pushes to the remote.
- Publishes the final GitHub release
- If the tag is on a backport branch, makes a forwardport PR for the changelog entry

Expand Down
23 changes: 12 additions & 11 deletions docs/source/get_started/making_release_from_releaser.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,22 @@ already uses Jupyter Releaser.

- Fork `jupyter_releaser`

- Generate a [GitHub Access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with access to target GitHub repo to run GitHub Actions
- Generate a [GitHub Access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with access to target GitHub repo to run GitHub Actions. You must use a classic
token since it will need writes to multiple repositories.

- Add the token as `ADMIN_GITHUB_TOKEN` in the [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) of your fork. The token must have `repo` and `workflow` scopes.
- Add the token as `PERSONAL_ACCESS_TOKEN` in the [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) of your fork. The token must have `repo` and `workflow` scopes.

- Set up PyPI:

<details><summary>Using PyPI trusted publisher (modern way)</summary>

- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
- if you use the example workflows, the _workflow name_ is `publish-release.yml` (or `full-release.yml`) and the
_environment_ should be set to the release environment configured on PyPI.
- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))

</details>

<details><summary>Using PyPI token (legacy way)</summary>

- If the repo generates PyPI release(s), create a scoped PyPI [token](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#saving-credentials-on-github). We recommend using a scoped token for security reasons.
Expand All @@ -40,15 +50,6 @@ already uses Jupyter Releaser.

</details>

<details><summary>Using PyPI trusted publisher (modern way)</summary>

- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
- if you use the example workflows, the _workflow name_ is `publish-release.yml` (or `full-release.yml`) and the
_environment_ should be left blank.
- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))

</details>

- If the repo generates npm release(s), add access token for [npm](https://docs.npmjs.com/creating-and-viewing-access-tokens), saved as `NPM_TOKEN` in "Secrets".

> If you want to set _provenance_ on your package, you need to ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions)).
Expand Down
5 changes: 3 additions & 2 deletions docs/source/get_started/making_release_from_repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ already uses Jupyter Releaser using workflows on its own repository.

## Prerequisites

- Admin write access to the target repository
- Previously set up GitHub Actions secrets for PyPI and/or NPM
- Access to run the workflow, and approve deployments in the environment
if applicable.
- Previously set up GitHub Actions secrets for PERSONAL_ACCESS_TOKEN, PYPI_TOKEN (if not using trusted publishers) and/or NPM_TOKEN.

## Prep Release

Expand Down
4 changes: 2 additions & 2 deletions docs/source/how_to_guides/convert_repo_from_releaser.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A. Prep the `jupyter_releaser` fork:
- [ ] Clone this repository onto your GitHub user account.

- [ ] Add a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with access to target GitHub repo to run
GitHub Actions, saved as `ADMIN_GITHUB_TOKEN` in the
GitHub Actions, saved as `PERSONAL_ACCESS_TOKEN` in the
[repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository).
The token will need "public_repo", and "repo:status" permissions.

Expand Down Expand Up @@ -47,7 +47,7 @@ A. Prep the `jupyter_releaser` fork:

<details><summary>Using PyPI trusted publisher (modern way)</summary>

- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/) pointing to your releaser fork repository and release workflow file.
- if you use the example workflows, the _workflow name_ is `publish-release.yml` (or `full-release.yml`) and the
_environment_ should be left blank.
- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))
Expand Down
36 changes: 19 additions & 17 deletions docs/source/how_to_guides/convert_repo_from_repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,28 @@ See checklist below for details:

## Checklist for Adoption

- [ ] 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
account that has admin access to the repository. The token itself will
need "public_repo", and "repo:status" permissions. Save the token as
`ADMIN_GITHUB_TOKEN`
in the [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository). We need this
access token to allow for branch protection rules, which block the pushing
of commits when using the `GITHUB_TOKEN`, even when run from an admin user
account.
- [ ] Add a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), preferably a fine-grained personal access token. For fine-grained personal tokens, the org must be configured to allow them. The org should "Require administrator approval" for fine-grained tokens. We need this
access token to allow the workflows to run when a pull request is
created by the action.
The fine-grained token should have the org as its
"Resource owner" and have "Pull Request: Read and Write" permissions
on the target repository. The token will have to have an expiration, but can be regenerated in the UI. Save the token as
`PERSONAL_ACCESS_TOKEN`
in the [Environment secrets](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#environment-secrets) for the environment used in the release workflow, which is "release" in the default template. There is no need to store the token anywhere
else, since it is only used for this purpose and can be re-generated
when expired.

- [ ] Set up PyPI:

<details><summary>Using PyPI trusted publisher (modern way)</summary>

- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
- if you use the example workflows, the _workflow name_ is `publish-release.yml` (or `full-release.yml`) and the
_environment_ should match the GitHub environment used in the PyPI trusted publisher setup.
- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))

</details>

<details><summary>Using PyPI token (legacy way)</summary>

- 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`.
Expand All @@ -36,15 +47,6 @@ See checklist below for details:

</details>

<details><summary>Using PyPI trusted publisher (modern way)</summary>

- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
- if you use the example workflows, the _workflow name_ is `publish-release.yml` (or `full-release.yml`) and the
_environment_ should be left blank.
- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))

</details>

- [ ] If needed, add access token for [npm](https://docs.npmjs.com/creating-and-viewing-access-tokens), saved as `NPM_TOKEN`. Again this should
be created using a machine account that only has publish access.
- [ ] Ensure that only trusted users with 2FA have admin access to the
Expand Down
13 changes: 10 additions & 3 deletions example-workflows/full-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,23 @@ on:
jobs:
full_release:
runs-on: ubuntu-latest
# The use of an environment is important for security, and required if you
# use PyPI trusted publisher.
environment: release
permissions:
# This is useful if you want to use PyPI trusted publisher
# and NPM provenance
id-token: write
contents: write
pull-requests: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Prep Release
id: prep-release
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
version_spec: ${{ github.event.inputs.version_spec }}
post_version_spec: ${{ github.event.inputs.post_version_spec }}
branch: ${{ github.event.inputs.branch }}
Expand All @@ -47,7 +52,8 @@ jobs:
id: populate-release
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
personal_access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
branch: ${{ github.event.inputs.branch }}
release_url: ${{ steps.prep-release.outputs.release_url }}
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
Expand All @@ -62,7 +68,8 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
personal_access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
release_url: ${{ steps.populate-release.outputs.release_url }}

- name: "** Next Step **"
Expand Down
2 changes: 1 addition & 1 deletion example-workflows/prep-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
id: prep-release
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
version_spec: ${{ github.event.inputs.version_spec }}
post_version_spec: ${{ github.event.inputs.post_version_spec }}
branch: ${{ github.event.inputs.branch }}
Expand Down
Loading