|
| 1 | +name: "Steps 1 + 2: Full Release" |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + version_spec: |
| 6 | + description: "New Version Specifier" |
| 7 | + default: "next" |
| 8 | + required: false |
| 9 | + branch: |
| 10 | + description: "The branch to target" |
| 11 | + required: false |
| 12 | + post_version_spec: |
| 13 | + description: "Post Version Specifier" |
| 14 | + required: false |
| 15 | + # silent: |
| 16 | + # description: "Set a placeholder in the changelog and don't publish the release." |
| 17 | + # required: false |
| 18 | + # type: boolean |
| 19 | + since: |
| 20 | + description: "Use PRs with activity since this date or git reference" |
| 21 | + required: false |
| 22 | + since_last_stable: |
| 23 | + description: "Use PRs with activity since the last stable git tag" |
| 24 | + required: false |
| 25 | + type: boolean |
| 26 | + steps_to_skip: |
| 27 | + description: "Comma separated list of steps to skip during Populate Release" |
| 28 | + required: false |
| 29 | +jobs: |
| 30 | + prep_release: |
| 31 | + runs-on: ubuntu-latest |
| 32 | + permissions: |
| 33 | + contents: write |
| 34 | + steps: |
| 35 | + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 36 | + |
| 37 | + - name: Prep Release |
| 38 | + id: prep-release |
| 39 | + uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2 |
| 40 | + with: |
| 41 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 42 | + version_spec: ${{ github.event.inputs.version_spec }} |
| 43 | + # silent: ${{ github.event.inputs.silent }} |
| 44 | + post_version_spec: ${{ github.event.inputs.post_version_spec }} |
| 45 | + target: ${{ github.event.inputs.target }} |
| 46 | + branch: ${{ github.event.inputs.branch }} |
| 47 | + since: ${{ github.event.inputs.since }} |
| 48 | + since_last_stable: ${{ github.event.inputs.since_last_stable }} |
| 49 | + |
| 50 | + publish_release: |
| 51 | + needs: [prep_release] |
| 52 | + runs-on: ubuntu-latest |
| 53 | + environment: release |
| 54 | + permissions: |
| 55 | + id-token: write |
| 56 | + steps: |
| 57 | + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 58 | + |
| 59 | + - uses: actions/create-github-app-token@v1 |
| 60 | + id: app-token |
| 61 | + with: |
| 62 | + app-id: ${{ vars.APP_ID }} |
| 63 | + private-key: ${{ secrets.APP_PRIVATE_KEY }} |
| 64 | + |
| 65 | + - name: Populate Release |
| 66 | + id: populate-release |
| 67 | + uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2 |
| 68 | + with: |
| 69 | + token: ${{ steps.app-token.outputs.token }} |
| 70 | + target: ${{ github.event.inputs.target }} |
| 71 | + branch: ${{ github.event.inputs.branch }} |
| 72 | + release_url: ${{ github.event.inputs.release_url }} |
| 73 | + steps_to_skip: ${{ github.event.inputs.steps_to_skip }} |
| 74 | + |
| 75 | + - name: Finalize Release |
| 76 | + id: finalize-release |
| 77 | + env: |
| 78 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 79 | + uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2 |
| 80 | + with: |
| 81 | + token: ${{ steps.app-token.outputs.token }} |
| 82 | + target: ${{ github.event.inputs.target }} |
| 83 | + release_url: ${{ steps.populate-release.outputs.release_url }} |
| 84 | + |
| 85 | + - name: "** Next Step **" |
| 86 | + if: ${{ success() }} |
| 87 | + run: | |
| 88 | + echo "Verify the final release" |
| 89 | + echo ${{ steps.finalize-release.outputs.release_url }} |
| 90 | +
|
| 91 | + - name: "** Failure Message **" |
| 92 | + if: ${{ failure() }} |
| 93 | + run: | |
| 94 | + echo "Failed to Publish the Draft Release Url:" |
| 95 | + echo ${{ steps.populate-release.outputs.release_url }} |
0 commit comments