Skip to content

Merge pull request #36 from dimitrismistriotis/update-library-to-1dot… #8

Merge pull request #36 from dimitrismistriotis/update-library-to-1dot…

Merge pull request #36 from dimitrismistriotis/update-library-to-1dot… #8

Workflow file for this run

#
# Under Construction
# References:
#
# https://futurestud.io/tutorials/github-actions-run-a-workflow-when-creating-a-tag
#
name: "Release"
on:
push:
tags:
- 'v*'
jobs:
pypi_upload:
runs-on: ubuntu-latest
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: "3.11" # Latest no need to change as one copy will be delivered
#
# Get tag:
#
# https://github.com/orgs/community/discussions/26686
#
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
# - run "echo "Uploading as ${TWINE_USERNAME}"
- run: |
python -m pip install --upgrade pip
pip install -r requirements_for_uploading.txt
- run: python setup.py sdist
# Note: if version from tag and one from within setup.py do not match,
# next step will fail. Let it as is for an additional check.
- run: twine upload "dist/alt-profanity-check-${{ steps.get_version.outputs.VERSION }}.tar.gz"