Skip to content

bump: version 3.0.0rc1 → 3.0.0rc2 #27

bump: version 3.0.0rc1 → 3.0.0rc2

bump: version 3.0.0rc1 → 3.0.0rc2 #27

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
jobs:
build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: build source tarball
run: |
python -m build --sdist
twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
build_wheels:
name: wheel on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# temporarily ignoring binary wheels for windows until pythran issues are fixed
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: build wheels
uses: pypa/[email protected]
- name: upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
publish_dev_build:
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://pypi.org/p/pylandstats
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: publish to test pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
release:
needs: [publish_dev_build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pylandstats
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# see https://github.com/softprops/action-gh-release/issues/236
contents: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: update changelog
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: create release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
- name: pre-commit on changelog
uses: pre-commit/[email protected]
with:
extra_args: --files CHANGELOG.md
# we only run this to format CHANGELOG.md so pre-commit will fail (yet format it)
continue-on-error: true
- name: commit changelog
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md