Skip to content

Commit

Permalink
global refacto + add install poetry step + remove 'on push main branc…
Browse files Browse the repository at this point in the history
…h' constraint
  • Loading branch information
amelie-rondot committed Feb 9, 2024
1 parent 03366f8 commit 04a380b
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches: [main]

env:
TOKEN: ${{ secrets.PYPI_TOKEN }}
PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TAG_VERSION: ${{ github.ref_name }}

jobs:
build:
build_and_publish:
runs-on: ubuntu-latest

steps:
Expand All @@ -23,35 +22,14 @@ jobs:
with:
python-version: '3.9'

- name: Install poetry
run: pip install poetry

- name: Build package
run: |
poetry version ${TAG_VERSION#v}
poetry build
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
retention-days: 1


publish:
runs-on: ubuntu-latest

needs: build

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Download archive
uses: actions/download-artifact@v4

- name: Config repository
run: |
poetry config pypi-token.pypi ${{ env.TOKEN }}
Expand Down

0 comments on commit 04a380b

Please sign in to comment.