Skip to content

Commit 3e69428

Browse files
committed
Merge branch 'main' of github.com:codeafix/mdlint-obsidian
2 parents 295bdbf + 4233625 commit 3e69428

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# This workflow will upload a Python Package to PyPI when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
release-build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.x"
28+
29+
- name: Build release distributions
30+
run: |
31+
# NOTE: put your own distribution build steps here.
32+
python -m pip install build
33+
python -m build
34+
35+
- name: Upload distributions
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: release-dists
39+
path: dist/
40+
41+
publish:
42+
needs: release-build
43+
runs-on: ubuntu-latest
44+
environment: testpypi
45+
permissions:
46+
id-token: write
47+
steps:
48+
- uses: actions/download-artifact@v4
49+
with:
50+
name: release-dists
51+
path: dist/
52+
- uses: pypa/gh-action-pypi-publish@release/v1
53+
with:
54+
repository-url: https://test.pypi.org/legacy/
55+
56+
# pypi-publish:
57+
# runs-on: ubuntu-latest
58+
# needs:
59+
# - release-build
60+
# permissions:
61+
# IMPORTANT: this permission is mandatory for trusted publishing
62+
# id-token: write
63+
64+
# Dedicated environments with protections for publishing are strongly recommended.
65+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
66+
# environment:
67+
# name: pypi
68+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
69+
# url: https://pypi.org/p/YOURPROJECT
70+
#
71+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
72+
# ALTERNATIVE: exactly, uncomment the following line instead:
73+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
74+
75+
# steps:
76+
# - name: Retrieve release distributions
77+
# uses: actions/download-artifact@v4
78+
# with:
79+
# name: release-dists
80+
# path: dist/
81+
82+
# - name: Publish release distributions to PyPI
83+
# uses: pypa/gh-action-pypi-publish@release/v1
84+
# with:
85+
# packages-dir: dist/

0 commit comments

Comments
 (0)