Skip to content

Commit

Permalink
feat(ci): update ci publish pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Alw3ys committed Feb 6, 2024
1 parent 81890af commit eb7fccc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/publish.yaml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/python-sdk-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: python-sdk-ci

on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]

permissions:
contents: write

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Setup Dependencies
run: |
python -m pip install poetry
poetry install
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Build
run: poetry build

- name: Publish
if: startsWith(github.ref, 'refs/tags/')
run: poetry publish

- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1

0 comments on commit eb7fccc

Please sign in to comment.