Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

ci: move to trusted publishing (#8506)

Myles Scolnick543bea433c4f
diff --git a/.github/workflows/marimo-bot.yml b/.github/workflows/marimo-bot.yml
index dd52d8af84..0bcc32c396 100644
--- a/.github/workflows/marimo-bot.yml
+++ b/.github/workflows/marimo-bot.yml
@@ -31,6 +31,11 @@ jobs:
contains(github.event.comment.body, '/marimo create-test-release')
name: 📤 Publish test release
runs-on: ubuntu-latest
+ environment: testpypi
+ permissions:
+ contents: read
+ pull-requests: write
+ id-token: write
defaults:
run:
shell: bash
@@ -118,10 +123,9 @@ jobs:
run: ./scripts/validate_base_wheel_size.sh
- name: 📤 Upload to TestPyPI
- env:
- HATCH_INDEX_USER: ${{ secrets.TEST_PYPI_USER }}
- HATCH_INDEX_AUTH: ${{ secrets.TEST_PYPI_MARIMO_BASE_PASSWORD }}
- run: uvx hatch publish --repo test
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ repository-url: https://test.pypi.org/legacy/
- name: 📦 Update package.json version from CLI
working-directory: frontend
diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml
index 32db362bb4..bde4e2e63b 100644
--- a/.github/workflows/release-dev.yml
+++ b/.github/workflows/release-dev.yml
@@ -14,6 +14,11 @@ jobs:
publish_dev_release:
name: 📤 Publish dev release
runs-on: ubuntu-latest
+ environment: testpypi
+ permissions:
+ contents: read
+ pull-requests: write
+ id-token: write
defaults:
run:
shell: bash
@@ -61,10 +66,9 @@ jobs:
run: uv build
- name: 📤 Upload to TestPyPI (marimo)
- env:
- HATCH_INDEX_USER: ${{ secrets.TEST_PYPI_USER }}
- HATCH_INDEX_AUTH: ${{ secrets.TEST_PYPI_PASSWORD }}
- run: uvx hatch publish --repo test
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ repository-url: https://test.pypi.org/legacy/
- name: Clean output dir
run: rm -rf dist
@@ -79,10 +83,9 @@ jobs:
run: ./scripts/validate_base_wheel_size.sh
- name: 📤 Upload to TestPyPI (marimo-base)
- env:
- HATCH_INDEX_USER: ${{ secrets.TEST_PYPI_USER }}
- HATCH_INDEX_AUTH: ${{ secrets.TEST_PYPI_MARIMO_BASE_PASSWORD }}
- run: uvx hatch publish --repo test
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ repository-url: https://test.pypi.org/legacy/
- name: 📦 Update package.json version from CLI
working-directory: frontend
diff --git a/.github/workflows/release-marimo-base.yml b/.github/workflows/release-marimo-base.yml
index 41d1854a4d..6bd8d9406d 100644
--- a/.github/workflows/release-marimo-base.yml
+++ b/.github/workflows/release-marimo-base.yml
@@ -23,6 +23,10 @@ jobs:
publish_release:
name: 📤 Publish release
runs-on: ubuntu-latest
+ environment: pypi
+ permissions:
+ contents: read
+ id-token: write
defaults:
run:
shell: bash
@@ -50,13 +54,9 @@ jobs:
run: ./scripts/validate_base_wheel_size.sh
- name: 📤 Upload to PyPI
- env:
- HATCH_INDEX_USER: ${{ secrets.PYPI_USER }}
- HATCH_INDEX_AUTH: ${{ secrets.PYPI_MARIMO_BASE_PASSWORD }}
- run: uvx hatch publish
+ uses: pypa/gh-action-pypi-publish@release/v1
- name: 📤 Upload to TestPyPI
- env:
- HATCH_INDEX_USER: ${{ secrets.TEST_PYPI_USER }}
- HATCH_INDEX_AUTH: ${{ secrets.TEST_PYPI_MARIMO_BASE_PASSWORD }}
- run: uvx hatch publish --repo test
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ repository-url: https://test.pypi.org/legacy/
diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml
index cacb9205b6..fb5d682824 100644
--- a/.github/workflows/release-prod.yml
+++ b/.github/workflows/release-prod.yml
@@ -15,6 +15,10 @@ jobs:
publish_release:
name: 📤 Publish release
runs-on: ubuntu-latest
+ environment: pypi
+ permissions:
+ contents: read
+ id-token: write
defaults:
run:
shell: bash
@@ -39,10 +43,7 @@ jobs:
run: hatch build
- name: 📤 Upload to PyPI
- env:
- HATCH_INDEX_USER: ${{ secrets.PYPI_USER }}
- HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
- run: hatch publish
+ uses: pypa/gh-action-pypi-publish@release/v1
- name: 🔨 Get version
id: get_version