Skip to content

Commit

Permalink
Another workflow attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoldverg committed Jan 18, 2024
1 parent a8eb8c1 commit 2cc159b
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,40 @@ name: ODS cli publish to pypi
on:
release:
types:
- created
- "published"

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

strategy:
matrix:
python-version: [ 3.10 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine setuptools build wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Update version
run: |
sed -i "s/<version>/${{ github.event.release.tag_name }}/g" setup.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build odscli
run: |
python setup.py sdist bdist_wheel
- name: Update version
run: |
sed -i "s/<version>/${{ github.event.release.tag_name }}/g" setup.py
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
pip install twine
twine upload dist/*
- name: Build and publish
shell: bash
run: |
twine upload -r pypi dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 2cc159b

Please sign in to comment.