diff options
Diffstat (limited to '.github/workflows/benchmark_publish_package.yml')
-rw-r--r-- | .github/workflows/benchmark_publish_package.yml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/benchmark_publish_package.yml b/.github/workflows/benchmark_publish_package.yml new file mode 100644 index 000000000..de0ca66fe --- /dev/null +++ b/.github/workflows/benchmark_publish_package.yml @@ -0,0 +1,55 @@ +name: Publish to PyPI + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: true + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install Poetry + working-directory: ./benchmark/ + run: | + curl -sSL https://install.python-poetry.org | python3 - + echo "$HOME/.poetry/bin" >> $GITHUB_PATH + + - name: Build project for distribution + working-directory: ./benchmark/ + run: poetry build + + - name: Install dependencies + working-directory: ./benchmark/ + run: poetry install + + - name: Check Version + working-directory: ./benchmark/ + id: check-version + run: | + echo version=$(poetry version --short) >> $GITHUB_OUTPUT + + - name: Create Release + uses: ncipollo/release-action@v1 + with: + artifacts: "benchmark/dist/*" + token: ${{ secrets.GITHUB_TOKEN }} + draft: false + generateReleaseNotes: false + tag: agbenchmark-v${{ steps.check-version.outputs.version }} + commit: master + + - name: Build and publish + working-directory: ./benchmark/ + run: poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} |