Skip to content

Commit

Permalink
chore: Update project template to sphinx-notes/cookiecutter@d09d3031
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Jul 9, 2024
1 parent a3115f8 commit 9884cdf
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sphinx-notes/cookiecutter",
"commit": "64d60218fb2be96a3293919fd233cc39acf8159f",
"commit": "d09d3031a2d20602007e1451def496c1bfad734d",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish package distributions to PyPI

on:
push:
tags:
- "*"

jobs:
pypi:
name: Publish package distributions to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/sphinxnotes-fasthtml
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install build twine && make dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
22 changes: 3 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
name: Publish New Release
name: Publish Github Release

on:
push:
tags:
- "*"
- "[0-9]+.[0-9]+" # MAJOR.MINOR (1.0: y, 1.0a0: n, 1.0.1: n)

jobs:
pypi:
name: Publish package distributions to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/sphinxnotes-fasthtml
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install build twine && make dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

release:
name: Publish Github Release
needs: [pypi]
Expand All @@ -33,4 +17,4 @@ jobs:
- uses: ncipollo/release-action@v1
with:
body: |
Changelog: https://sphinx.silverrainz.me/fasthtml/changelog.html#version-${{ github.ref_name }}
Changelog: https://sphinx.silverrainz.me/fasthtml/changelog.html
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LANG = en_US.UTF-8
MAKE = make
PY = python3
RM = rm -rf
GIT = git

# Build sphinx documentation.
.PHONY: docs
Expand Down Expand Up @@ -51,6 +52,10 @@ upload-test: dist
update-template:
$(PY) -m cruft update

.PHONY: update-template-done
update-template-done:
$(GIT) commit -m "chore: Update project template to sphinx-notes/cookiecutter@$(shell jq -r '.commit' .cruft.json | head -c8)"

# Update project version.
.PHONY: bump-version
bump-version:
Expand Down

0 comments on commit 9884cdf

Please sign in to comment.