Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release workflow #83

Merged
merged 4 commits into from
Jan 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading