Merge pull request #897 from swyddfa/develop #3
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
name: 'Release: esbonio-extensions' | |
on: | |
push: | |
branches: | |
- release | |
paths: | |
- 'lib/esbonio-extensions/**' | |
jobs: | |
release: | |
name: "esbonio-extensions release" | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/esbonio-extensions | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- run: | | |
python --version | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade tox hatch towncrier docutils | |
name: Setup Environment | |
- run: | | |
set -e | |
./scripts/make_release.py extensions | |
name: Set Version | |
- name: Package | |
run: | | |
cd lib/esbonio-extensions | |
python -m tox -e pkg | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'dist' | |
path: lib/esbonio-extensions/dist | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: lib/esbonio-extensions/dist/ | |
- name: Create Release | |
run: | | |
gh release create "${RELEASE_TAG}" \ | |
--title "Esbonio Extensions v${VERSION} - ${RELEASE_DATE}" \ | |
-F lib/esbonio-extensions/.changes.html \ | |
./lib/esbonio-extensions/dist/* | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |