Skip to content

Release Packages

Release Packages #13

Workflow file for this run

on:
- workflow_dispatch
name: Release Packages
jobs:
build:
name: Create the package
runs-on: ubuntu-latest
environment: github_release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- id: build
run: pip install hatch==1.6.3 && hatch build
- id: version
run: |
version=$(python -c "import runpy; print(runpy.run_path('noseOfYeti/version.py')['VERSION'])")
versiondash=$(python -c "import runpy; print(runpy.run_path('noseOfYeti/version.py')['VERSION'].replace('.', '-'))")
echo "version=$version" >> $GITHUB_OUTPUT
echo "versiondash=$versiondash" >> $GITHUB_OUTPUT
- id: create-release
uses: softprops/action-gh-release@v1
with:
name: noseOfYeti ${{ steps.version.outputs.version }}
body: "https://noseOfYeti.readthedocs.io/en/latest/api/changelog.html#release-${{ steps.version.outputs.versiondash }}"
tag_name: "release-${{ steps.version.outputs.version }}"
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
draft: false
prerelease: false
files: "dist/*"
- uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN_CORE }}
packages_dir: dist