From 2a3c981e8e1735944d34047258138fab6dc64297 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Wed, 3 Jan 2024 09:44:08 +0100 Subject: [PATCH] Update publish workflow for trusted publishers (#105) * Update publish workflow for trusted publishers * Add npm metadata --- .github/workflows/publish-release.yml | 23 +++++++++++------------ packages/voici/package.json | 8 ++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index dbaaeaa..cbe77f7 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -1,20 +1,24 @@ -name: "Step 2: Publish Release" +name: 'Step 2: Publish Release' on: workflow_dispatch: inputs: branch: - description: "The target branch" + description: 'The target branch' required: false release_url: - description: "The URL of the draft GitHub release" + description: 'The URL of the draft GitHub release' required: false steps_to_skip: - description: "Comma separated list of steps to skip" + description: 'Comma separated list of steps to skip' required: false jobs: publish_release: runs-on: ubuntu-latest + permissions: + # This is useful if you want to use PyPI trusted publisher + # and NPM provenance + id-token: write steps: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 @@ -23,7 +27,6 @@ jobs: uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2 with: token: ${{ secrets.ADMIN_GITHUB_TOKEN }} - target: ${{ github.event.inputs.target }} branch: ${{ github.event.inputs.branch }} release_url: ${{ github.event.inputs.release_url }} steps_to_skip: ${{ github.event.inputs.steps_to_skip }} @@ -31,23 +34,19 @@ jobs: - name: Finalize Release id: finalize-release env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - PYPI_TOKEN_MAP: ${{ secrets.PYPI_TOKEN_MAP }} - TWINE_USERNAME: __token__ NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - uses: jupyter-server/jupyter-releaser/.github/actions/finalize-release@v2 + uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2 with: token: ${{ secrets.ADMIN_GITHUB_TOKEN }} - target: ${{ github.event.inputs.target }} release_url: ${{ steps.populate-release.outputs.release_url }} - - name: "** Next Step **" + - name: '** Next Step **' if: ${{ success() }} run: | echo "Verify the final release" echo ${{ steps.finalize-release.outputs.release_url }} - - name: "** Failure Message **" + - name: '** Failure Message **' if: ${{ failure() }} run: | echo "Failed to Publish the Draft Release Url:" diff --git a/packages/voici/package.json b/packages/voici/package.json index 24affbe..e948848 100644 --- a/packages/voici/package.json +++ b/packages/voici/package.json @@ -6,6 +6,14 @@ "license": "BSD-3-Clause", "main": "lib/main.js", "browserslist": ">0.8%, not ie 11, not op_mini all, not dead", + "homepage": "https://github.com/voila-dashboards/voici", + "bugs": { + "url": "https://github.com/voila-dashboards/voici/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/voila-dashboards/voici" + }, "dependencies": { "@jupyter-widgets/base": "^6.0.6", "@jupyter-widgets/jupyterlab-manager": "^5.0.9",