Skip to content

Start a New Release #56

Start a New Release

Start a New Release #56

Workflow file for this run

name: Start a New Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version Tag in the form X.Y.Z'
required: true
type: string
jobs:
build:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-tags: true
ref: master
token: ${{ secrets.APP_SECRET }} # Needed to trigger other actions
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch git-cliff
- name: Update changelog
run: |
git cliff -o CHANGELOG.md
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.APP_SECRET }}
# with:
# tag_name: ${{ inputs.version }}
# release_name: Release ${{ inputs.version }}
# draft: false
# prerelease: false
- name: Build package
run: hatch build
- name: Publish to PyPI
run: |
export PYPI_USERNAME=__token__
export PYPI_PASSWORD=${{ secrets.TEST_PASS_PYPI }}
hatch publish
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.TEST_PASS_PYPI }}