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

ci: rename deploy to pypi workflow and environment to be consistent with other packages #16

Merged
merged 1 commit into from
Aug 19, 2023
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Publish to PyPI
name: Deploy package to PyPI

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -14,8 +16,8 @@ jobs:

- name: Update version in pyproject.toml from current git tag
run: >-
sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF/refs\/tags\/v/}/g" setup.py
sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF/refs\/tags\/v/}/g" pyproject.toml

- run: |
pip install build
python -m build
Expand All @@ -24,19 +26,20 @@ jobs:
with:
path: ./dist

pypi-publish:
needs: ['build']
environment: 'publish-pypi'
deploy:
needs: [build]
environment:
name: pypi
url: https://pypi.org/project/sqlite-s3vfs/

name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v3

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: artifact/
packages_dir: artifact/