Skip to content

chore: bump to v0.1.2 #7

chore: bump to v0.1.2

chore: bump to v0.1.2 #7

Workflow file for this run

name: Build and publish to PyPI
on:
push:
tags:
- 'v*' # push tags to trigger the workflow
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: false
jobs:
build-wheel:
name: wheels
runs-on: ubuntu-latest
# trigger the workflow only on default branch, or manually
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp3{8,9,10,11}-manylinux_x86_64
# force manylinux2014 to avoid compatibility issues on RHEL 7
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# install required dependencies: bz2
CIBW_BEFORE_ALL: yum install -y bzip2-devel
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/*.whl
build-sdist:
name: sdist
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build source distribution
run: pipx run build --sdist
- name: Upload source distribution
uses: actions/upload-artifact@v2
with:
name: sdist
path: dist/*.tar.gz
publish:
name: publish
runs-on: ubuntu-latest
needs: [build-wheel, build-sdist]
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Download wheels
uses: actions/download-artifact@v2
with:
path: dist
- name: Move wheels to dist
run: |
mv dist/wheels/*.whl dist
mv dist/sdist/*.tar.gz dist
rm -r dist/wheels
rm -r dist/sdist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
release:
name: wheels
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download wheels
uses: actions/download-artifact@v2
with:
path: dist
- name: Move wheels to dist
run: |
mv dist/wheels/*.whl dist
mv dist/sdist/*.tar.gz dist
rm -r dist/wheels
rm -r dist/sdist
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Generate Changelog
run: |
npm install -g conventional-changelog-cli
conventional-changelog -p angular -i dist/CHANGELOG.md -s
- name: Create a new Release
uses: ncipollo/release-action@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# https://github.com/ncipollo/release-action for the full list of arguments
artifacts: dist/*.whl,dist/*.tar.gz
draft: true # generate a draft release
generateReleaseNotes: false
bodyFile: dist/CHANGELOG.md
# generate a pre-release if 'pre', 'rc', or 'beta' is in the tag name, or triggered manually
prerelease: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref, 'beta') || contains(github.ref, 'rc') || contains(github.ref, 'pre') }}
# use the tag name if it's a tag, otherwise use the commit hash
continue-on-error: true