Skip to content

Commit

Permalink
Update publish workflow for trusted publishers (#105)
Browse files Browse the repository at this point in the history
* Update publish workflow for trusted publishers

* Add npm metadata
  • Loading branch information
jtpio authored Jan 3, 2024
1 parent dceb8ac commit 2a3c981
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -23,31 +27,26 @@ 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 }}

- 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:"
Expand Down
8 changes: 8 additions & 0 deletions packages/voici/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2a3c981

Please sign in to comment.