Skip to content

Commit

Permalink
Merge pull request #16 from uktrade/ci/rename-deploy-package-workflow…
Browse files Browse the repository at this point in the history
…-and-environment

ci: rename deploy to pypi workflow and environment to be consistent with other packages
  • Loading branch information
michalc committed Aug 19, 2023
2 parents 103d5c3 + 879e60b commit aac52bd
Showing 1 changed file with 11 additions and 8 deletions.
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/

0 comments on commit aac52bd

Please sign in to comment.