Skip to content

Bump version: 0.36.4 → 0.36.5 #63

Bump version: 0.36.4 → 0.36.5

Bump version: 0.36.4 → 0.36.5 #63

Workflow file for this run

# Publish package on main branch if it's tagged with 'v*'
# Ref: https://github.community/t/run-workflow-on-push-tag-on-specific-branch/17519
name: build & release
permissions:
contents: read
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- 'v*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
release:
name: Create Release
runs-on: ubuntu-latest
# 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
- name: Checkout code
uses: actions/checkout@v4
# with:
# fetch-depth: 0
- name: Fail if tag is not on main
run: |
git fetch origin main
git merge-base --is-ancestor "$GITHUB_SHA" "origin/main"
# Temporarily disable this - I want it to trigger on merge, but it doesn't
# work (at least not on a tagged commit too)
# - name: Exit if not on main branch
# if: endsWith(github.ref, 'main') == false
# run: exit -1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
# - name: Replace version in README
# run: |
# VERSION=$(grep -oP "__version__\s*=\s*'\K[^']+" dataclass_wizard/__version__.py)
# echo "Extracted version: $VERSION"
# sed -i "s/|version|/$VERSION/g" README.rst
- name: Build wheels and source tarball
run: |
make dist
- name: Check dist metadata
run: |
python -m pip install --upgrade pip
python -m pip install twine
twine check dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true