Skip to content

Bump version v2.1.0 -> v2.2.0a0 #45

Bump version v2.1.0 -> v2.2.0a0

Bump version v2.1.0 -> v2.2.0a0 #45

Workflow file for this run

---
name: Publish on Test PyPI and PyPI
on:
push:
branches:
# Commits pushed to release/ branches are published on Test PyPI if they
# have a new version number.
- release/**
tags:
# Tags that start with the "v" prefix are published on PyPI.
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pypa/build
run: python -m pip install build
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Upload distribution artifact
uses: actions/upload-artifact@v4
with:
name: release
path: dist/
publish-test:
name: Build and publish on TestPyPI
if: >
startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
environment:
name: Test PyPI
url: https://test.pypi.org/project/aiidalab-widgets-base/
steps:
- uses: actions/download-artifact@v4
name: Download distribution artifact
with:
name: release
path: dist/
- name: Publish distribution on Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/heads/release/')
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
publish:
name: Build and publish on PyPI
if: startsWith(github.ref, 'refs/tags')
needs: [build]
runs-on: ubuntu-latest
environment:
name: PyPI
url: https://pypi.org/project/aiidalab-widgets-base/
steps:
- uses: actions/download-artifact@v4
name: Download distribution artifact
with:
name: release
path: dist/
- uses: softprops/action-gh-release@v0.1.15
name: Create release
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
dist/*
generate_release_notes: true
- name: Publish distribution on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}