chore(release): bump to 1.0.3 (#15) #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish pybwa | |
on: | |
push: | |
tags: '\d+.\d+.\d+' | |
env: | |
POETRY_VERSION: 1.8.2 | |
jobs: | |
on-main-branch-check: | |
runs-on: ubuntu-24.04 | |
outputs: | |
on_main: ${{ steps.contains_tag.outputs.retval }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: 'true' | |
- uses: rickstaa/action-contains-tag@v1 | |
id: contains_tag | |
with: | |
reference: "main" | |
tag: "${{ github.ref_name }}" | |
tests: | |
name: tests | |
needs: on-main-branch-check | |
if: ${{ needs.on-main-branch-check.outputs.on_main == 'true' }} | |
uses: "./.github/workflows/tests.yml" | |
build-wheels: | |
name: build wheels | |
needs: tests | |
uses: "./.github/workflows/wheels.yml" | |
build-sdist: | |
name: build source distribution | |
needs: tests | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry==${{env.POETRY_VERSION}} | |
- name: Configure poetry | |
shell: bash | |
run: poetry config virtualenvs.in-project true | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-root --without=dev | |
- name: Install project | |
run: poetry install --no-interaction --without=dev | |
- name: Build package | |
run: poetry build --format=sdist | |
- name: Print contents | |
run: tar -tf dist/*.tar.gz | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pybwa-sdist | |
path: dist/*.tar.gz | |
publish-to-pypi: | |
runs-on: ubuntu-24.04 | |
needs: [build-wheels, build-sdist] | |
environment: pypi | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: packages | |
pattern: 'pybwa-*' | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: packages/ | |
skip-existing: true | |
verbose: true | |
make-changelog: | |
runs-on: ubuntu-24.04 | |
needs: publish-to-pypi | |
outputs: | |
release_body: ${{ steps.git-cliff.outputs.content }} | |
steps: | |
- name: Checkout the Repository at the Tagged Commit | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.ref_name }} | |
submodules: true | |
- name: Generate a Changelog | |
uses: orhun/git-cliff-action@v3 | |
id: git-cliff | |
with: | |
config: pyproject.toml | |
args: --latest --verbose | |
env: | |
GITHUB_REPO: ${{ github.repository }} | |
make-github-release: | |
runs-on: ubuntu-24.04 | |
environment: github | |
permissions: | |
contents: write | |
pull-requests: read | |
needs: make-changelog | |
steps: | |
- name: Download the sdist | |
uses: actions/download-artifact@v4 | |
with: | |
name: pybwa-sdist | |
- name: Display structure of downloaded files | |
shell: bash | |
run: ls -R | |
- name: Create Draft Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ github.ref_name }} | |
body: ${{ needs.make-changelog.outputs.release_body }} | |
draft: false | |
prerelease: false | |
files: | | |
pybwa*tar.gz | |