Skip to content

Bump actions/setup-python from 4 to 5 #13

Bump actions/setup-python from 4 to 5

Bump actions/setup-python from 4 to 5 #13

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:
linux:
name: "${{ matrix.image }} ${{ matrix.arch }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
image: ["manylinux_2_28", "musllinux_1_1"]
arch: ["x86_64", "aarch64"]
exclude:
- image: "musllinux_1_1"
arch: "aarch64"
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- run: pipx install cmeel
- run: cmeel docker -Ui "quay.io/pypa/${{ matrix.image }}_${{ matrix.arch }}"
- uses: actions/upload-artifact@v3
with:
path: wh
macos:
name: "macos"
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v4
- 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@v3
with:
path: wh
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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] cmeel-gettext cmeel-help2man
- name: build sdist
run: python -m build -nso dist .
- uses: actions/upload-artifact@v3
with:
path: dist
release:
needs: ["linux", "macos", "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@v3
- run: pipx install twine
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/cmeel_texinfo*.whl
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/cmeel_texinfo*.tar.gz || true
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: gh release create -t "Release ${{ env.TAG}}" "${{ env.TAG }}" artifact/cmeel_texinfo*.{whl,tar.gz}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}