Skip to content

Commit

Permalink
workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdia Soper Mac Cafraidh committed Sep 20, 2024
1 parent 0510bed commit 000a30b
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions .github/workflows/dispatch-release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
release:
types: [published]
workflow_dispatch:
push:

permissions:
contents: read
Expand All @@ -21,20 +22,28 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and check Python distributions
- name: Check Library Version Matches Ref
run: |
python setup.py sdist bdist_wheel
twine check dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
version=`grep -o "v\d.\d.\d" learnosity_sdk/_version.py`
if [ "$version" != "${{ github.ref_name }}" ]; then
echo "$version doesn't match ${{ github.ref_name }}"
exit 1
fi
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.x'

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install setuptools wheel twine

# - name: Build and check Python distributions
# run: |
# python setup.py sdist bdist_wheel
# twine check dist/*

# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 000a30b

Please sign in to comment.