Skip to content

Commit

Permalink
build: update ci configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenlu committed Apr 12, 2023
1 parent 5a53751 commit 78a4dbc
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions .github/workflows/poetry-publish.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,19 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish Python Package
name: Build and publish python package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

publish-service-client-package:
runs-on: ubuntu-latest

permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Build package and publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry config pypi-token.pypi "${POETRY_PYPI_TOKEN_PYPI}" && poetry publish --build
poetry config http-basic.mypypi "__token__" "${POETRY_PYPI_TOKEN_PYPI}"
- name: Publish PyPi package
uses: code-specialist/pypi-poetry-publish@v1
with:
PYTHON_VERSION: "3.10"
POETRY_VERSION: "1.4.2"
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PUBLISH_REGISTRY_PASSWORD }}

0 comments on commit 78a4dbc

Please sign in to comment.