Skip to content

[pre-commit.ci] pre-commit autoupdate #18

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #18

Workflow file for this run

name: Release on GitHub & PyPI
on:
push:
tags:
- "v*"
branches:
- main
pull_request_target:
branches:
- main
env:
CMEEL_LOG_LEVEL: DEBUG
jobs:
wheel:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: python -m pip install -U pip
- run: python -m pip wheel -vw wh .
- uses: actions/upload-artifact@v4
with:
path: wh
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: setup
run: |
python -m pip install -U pip
python -m pip install build cmeel[build]
- name: build sdist
run: python -m build -nso dist .
- uses: actions/upload-artifact@v4
with:
path: dist
release:
needs: ["wheel", "sdist"]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- run: curl https://github.com/nim65s.gpg | gpg --import
- name: validate signature
run: >
git verify-tag --raw ${{ github.ref_name }} 2>&1
| grep -q 'VALIDSIG 9B1A79065D2F2B806C8A5A1C7D2ACDAF4653CF28'
- uses: actions/download-artifact@v4
- run: pipx install twine
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/cmeel_simde*.whl
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/cmeel_simde*.tar.gz || true
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: gh release create -t "Release ${{ env.TAG}}" "${{ env.TAG }}" artifact/cmeel_simde*.{whl,tar.gz}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}