From 98eaec34e3617c1e9bb83b2b4b09b2e4866fe8a0 Mon Sep 17 00:00:00 2001 From: Duc Trung Le Date: Mon, 11 Mar 2024 13:10:25 +0100 Subject: [PATCH] Use environment in CI (#77) * Use release environment in CI * Update prep-release workflow --- .github/workflows/prep-release.yml | 26 ++++++++++---------------- .github/workflows/publish-release.yml | 1 + 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/prep-release.yml b/.github/workflows/prep-release.yml index 7afdc9b..83e9fd1 100644 --- a/.github/workflows/prep-release.yml +++ b/.github/workflows/prep-release.yml @@ -1,22 +1,22 @@ -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: @@ -25,17 +25,11 @@ jobs: 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 }} @@ -43,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 }}" 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: