Skip to content

Commit

Permalink
Tweak publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
flipbit03 committed Dec 1, 2024
1 parent 028dad8 commit 5b10273
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,32 @@ jobs:
name: Build and Publish
runs-on: ubuntu-22.04

strategy:
matrix:
python-versions: [3.12.2]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-versions }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Set version from GITHUB_REF
run: >-
run: |
# GITHUB_REF will be `refs/tags/v1.2.3` for a tag named "v1.2.3"
# we strip the `refs/tags/` part to get the version number
# we also strip "v" from the version number, if it exists, getting "1.2.3"
echo "GITHUB_REF: ${{ github.ref }}"
export VERSION=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,' -e 's/^v//')
echo Setting version to $VERSION
echo Setting version to $VERSION using poetry
poetry version $VERSION
- name: Build wheels and source tarball
run: >-
run: |
poetry build
- name: show temporary files
run: >-
run: |
ls -l
- name: publish to PyPI
Expand Down

0 comments on commit 5b10273

Please sign in to comment.