Merge branch 'main' of https://github.com/j-raghavan/orchestrator #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.2 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Install Dependencies | |
run: | | |
poetry config virtualenvs.create false | |
poetry install --no-interaction --with dev | |
pip install 'python-semantic-release[build,dev,docs,mypy,test]' | |
pip install --no-deps structlog gitpython gitdb click tomlkit dotty_dict packaging requests semver rich wheel smmap typing-extensions urllib3 certifi idna charset-normalizer | |
- name: Configure Git | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Semantic Release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
# Get the new version | |
VERSION=$(semantic-release version --patch --print) | |
echo "New version: $VERSION" | |
# Update Poetry version | |
poetry version $VERSION | |
# Build the package | |
poetry build | |
# Commit the version changes | |
git add pyproject.toml | |
git commit -m "chore(release): bumping version to v${VERSION}" | |
git push | |
# Create GitHub release | |
gh release create "v${VERSION}" \ | |
--title "Release v${VERSION}" \ | |
--notes "Release v${VERSION}" \ | |
dist/* \ | |
--draft=false \ | |
--prerelease=false |