Skip to content

Commit

Permalink
Fix release workflow (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaramallion authored Jan 7, 2024
1 parent c0766f1 commit 49c19c8
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/release-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,43 @@ name: release-deploy
on:
release:
types: [ published ]
# push:
# branches: [ main ]
# pull_request:

jobs:
build_deploy:
name: Build and deploy
build-deploy:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/pylibjpeg/
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v5
name: Install Python
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install requirements
python-version: 3.8

- name: Install required packages
run: |
python -m pip install -U pip
python -m pip install twine wheel
python -m pip install build
- name: Build wheels and sdist
run: |
python setup.py sdist bdist_wheel
python -m build
- uses: actions/upload-artifact@v4
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels
path: ./dist

- name: Publish package to PyPi
environment:
name: pypi
url: https://pypi.org/project/pylibjpeg/
permissions:
id-token: write

steps:
- name: Download the wheels
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true

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

0 comments on commit 49c19c8

Please sign in to comment.