forked from Python-Markdown/markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Releases action to deploy workflow
While we don't really need to upload release files to GitHub (as they are uploaded to PyPI), creating releases does provide a mechanism to notify users that a new release is available. As GitHub will automaticaly create files from the repo when none are provided, we upload the official distribution files instead. Fixes Python-Markdown#1365.
- Loading branch information
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,19 +14,25 @@ jobs: | |
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel build | ||
- name: Build | ||
run: | | ||
python -m build | ||
- name: Publish | ||
- name: Publish to PyPI | ||
if: success() | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
- name: Release to GitHub | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
uses: fnkr/github-action-ghr@v1 | ||
env: | ||
GHR_PATH: dist/ | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
ghpages: | ||
runs-on: ubuntu-latest | ||
|
@@ -35,15 +41,15 @@ jobs: | |
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
python-version: 3.11 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install .[docs] | ||
- name: Build | ||
run: | | ||
python -m mkdocs build --clean --verbose | ||
- name: Publish | ||
- name: Publish to GitHub Pages | ||
if: success() | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
|