Skip to content

Commit

Permalink
Update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Jan 2, 2024
1 parent d5a2b09 commit ef123c6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
- uses: actions/checkout@v4
with:
ref: main
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -30,11 +32,10 @@ jobs:
return context.payload.inputs.version
}
return context.ref.split('/').pop()
- name: Install builder
- name: Install dependencies
run: |
python -m pip install -U poetry pip wheel
poetry install -n
poetry run pip install -U twine
poetry run pip install -U twine wheel
- name: Bump version
env:
VERSION: ${{ steps.version.outputs.result }}
Expand All @@ -43,15 +44,15 @@ jobs:
poetry version ${VERSION}
rm -rf *.egg-info || true
poetry install -n
- name: Setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
- name: Commit changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.version.outputs.result }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git add pyproject.toml
git add setup.cfg
git commit -m "Release ${VERSION}"
git push
- name: Publish to PyPI
Expand All @@ -60,4 +61,4 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
poetry build
twine upload --non-interactive dist/*
poetry run twine upload --non-interactive dist/*

0 comments on commit ef123c6

Please sign in to comment.