Bump version to 1.2.1 #6
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 Python Package | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
publish-package: | |
name: Publish Package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set tag version | |
id: tag_version | |
run: | | |
tag=$(echo $GITHUB_REF | cut -d / -f 3) | |
echo ::set-output name=version::${tag:1} | |
- name: Install dependencies | |
run: python3 -m pip install --upgrade build twine | |
- name: Build project | |
run: python3 -m build | |
- name: Check build | |
run: python3 -m twine check dist/* | |
- name: Install heif-convert | |
run: sudo python3 setup.py install | |
- name: Assert tag version match Python package version | |
run: | | |
expected="heif-convert ${{ steps.tag_version.outputs.version }}" | |
actual=$(heif-convert --version) | |
echo expected=\"$expected\" | |
echo actual=\"$actual\" | |
[[ $expected == $actual ]] | |
- name: Remove deprecated egg file | |
run: rm -f dist/*.egg | |
- name: Publish project | |
run: python3 -m twine upload dist/* -u ${{ secrets.PYPY_USERNAME }} -p ${{ secrets.PYPY_PASSWORD }} --non-interactive |