From 4c3476fcf0d106ba6aba0076a261602bb7146ccb Mon Sep 17 00:00:00 2001 From: Duc Trung Le Date: Mon, 11 Mar 2024 10:52:51 +0100 Subject: [PATCH 1/2] Use release environment in CI --- .github/workflows/prep-release.yml | 1 + .github/workflows/publish-release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/prep-release.yml b/.github/workflows/prep-release.yml index 7afdc9b..c7c0297 100644 --- a/.github/workflows/prep-release.yml +++ b/.github/workflows/prep-release.yml @@ -22,6 +22,7 @@ on: jobs: prep_release: runs-on: ubuntu-latest + environment: release steps: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 35bc2ab..6597f84 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -15,6 +15,7 @@ on: jobs: publish_release: runs-on: ubuntu-latest + environment: release permissions: id-token: write steps: From f4bd1b006886988c782a16ef0db622559cbbdb20 Mon Sep 17 00:00:00 2001 From: Duc Trung Le Date: Mon, 11 Mar 2024 11:04:22 +0100 Subject: [PATCH 2/2] Update prep-release workflow --- .github/workflows/prep-release.yml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/prep-release.yml b/.github/workflows/prep-release.yml index c7c0297..83e9fd1 100644 --- a/.github/workflows/prep-release.yml +++ b/.github/workflows/prep-release.yml @@ -1,42 +1,35 @@ -name: 'Step 1: Prep Release' +name: "Step 1: Prep Release" on: workflow_dispatch: inputs: version_spec: - description: 'New Version Specifier' - default: 'next' + description: "New Version Specifier" + default: "next" required: false branch: - description: 'The branch to target' + description: "The branch to target" required: false post_version_spec: - description: 'Post Version Specifier' + description: "Post Version Specifier" required: false since: - description: 'Use PRs with activity since this date or git reference' + description: "Use PRs with activity since this date or git reference" required: false since_last_stable: - description: 'Use PRs with activity since the last stable git tag' + description: "Use PRs with activity since the last stable git tag" required: false type: boolean jobs: prep_release: runs-on: ubuntu-latest - environment: release steps: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - - name: Prep Release id: prep-release uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2 with: - token: ${{ steps.app-token.outputs.token }} + token: ${{ secrets.GITHUB_TOKEN }} version_spec: ${{ github.event.inputs.version_spec }} post_version_spec: ${{ github.event.inputs.post_version_spec }} target: ${{ github.event.inputs.target }} @@ -44,6 +37,6 @@ jobs: since: ${{ github.event.inputs.since }} since_last_stable: ${{ github.event.inputs.since_last_stable }} - - name: '** Next Step **' + - name: "** Next Step **" run: | - echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}" \ No newline at end of file + echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"