Skip to content

Commit

Permalink
build python from local.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-i-berry committed Aug 21, 2024
1 parent 5bf29e1 commit 16941ad
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: release

on:
push:
release:
types: [publish]
types: [published]

permissions:
contents: read
Expand All @@ -16,28 +15,6 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
#pypi-build-dist-artefacts-and-publish:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - name: Setup pyenv
# run: |
# python -m pip install build twine

# - name: Build and publish
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}
# run: |
# # build
# echo "Building ..."
# python -m build
# # use twine
# echo "Uploading ..."
# twine upload -r testpypi dist/*

ghcr-build-and-publish:
runs-on: ubuntu-latest
steps:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: release

on:
release:
types: [published]

permissions:
contents: read
packages: write
issues: write
pull-requests: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}

jobs:
pypi-build-dist-artefacts-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pyenv
run: |
python -m pip install build twine
- name: Build and publish
run: |
# build
echo "Building ..."
python -m build
# use twine
echo "Uploading ..."
twine upload dist/*

0 comments on commit 16941ad

Please sign in to comment.