Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Publish pre-release

on:
push:
branches:
- main

jobs:
pre_release:
name: Pre-Release
runs-on: ubuntu-latest
permissions:
actions: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: '3.7'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y

- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install Poetry Plugin
run: poetry self add "poetry-dynamic-versioning[plugin]"

- name: Check Pre-Release Version
id: check-version
run: |
echo "::debug::Package version: $(poetry version --short)"
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT

- name: Exit if not Pre-Release Version
if: steps.check-version.outputs.prerelease != 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}

- name: Build package
run: poetry build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
37 changes: 0 additions & 37 deletions .github/workflows/python-publish.yml

This file was deleted.