Skip to content

Commit

Permalink
ci: add semantic-release to publish to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
tillywoodfield committed May 28, 2024
1 parent f2e5439 commit 6310881
Show file tree
Hide file tree
Showing 5 changed files with 7,547 additions and 127 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release
on: [push]

jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/iati-sphinx-theme
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install dependencies
run: npm ci
- name: Build CSS
run: npm run build
- name: Release
run: npx semantic-release --dry-run --branches publish-pypi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion iati_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import sphinx.application

__version__ = "0.0.0"
__version__ = "0.0.0-semantically-released"


def setup(app: sphinx.application.Sphinx) -> None:
Expand Down
Loading

0 comments on commit 6310881

Please sign in to comment.