-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.61 KB
/
Copy pathpublish.yml
File metadata and controls
55 lines (44 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: publish
# Publishes dagster-community-components to PyPI when a tag like v0.1.0 is pushed.
#
# Uses PyPI Trusted Publishing (OIDC) — no API token in repo secrets needed.
# Configure once at https://pypi.org/manage/project/dagster-community-components/settings/publishing/
# with these values:
# Owner: eric-thomas-dagster
# Repository name: dagster-component-templates
# Workflow filename: publish.yml
# Environment name: (leave blank or set to "release")
on:
push:
tags:
- "v*"
workflow_dispatch: {} # allow manual run for verifying Trusted Publishing setup
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
# Required for PyPI Trusted Publishing (id-token).
id-token: write
# Required so the build step can read the repo.
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tools
run: pip install --upgrade build twine
# Note: tools/generate_init.py is dev-only (gitignored). The committed
# dagster_community_components/__init__.py is the source of truth for
# publishing — regenerate locally before bumping the version + tagging.
- name: Build sdist + wheel
run: python -m build
- name: Verify metadata
run: twine check dist/*
- name: Publish to PyPI (Trusted Publishing — no token required)
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true