Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: don't send chat notification on post releases / release only on "feat" or "fix" (DEV-3148) #707

Merged
merged 3 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/publish-dev-release-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---

name: Publish dev-release to PyPI

on:
pull_request:
types:
- closed

env:
TOKEN: ${{ secrets.GH_TOKEN }}

jobs:
publish-dev-release-to-pypi:
if: github.event.pull_request.merged == true && (contains(github.event.pull_request.title, 'fix') || contains(github.event.pull_request.title, 'feat'))
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install
poetry self add poetry-exec-plugin
- name: bump version in pyproject.toml
run: poetry exec bump-version
- name: publish new version to PyPI
run: |
rm -rf dist/ build/
poetry build
poetry publish -u=__token__ -p=${{ secrets.PYPI_DASCHBOT_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
---

name: Publish to PyPI
name: Publish release to PyPI

on:
push:
branches:
- main
release:
types: [released]

env:
TOKEN: ${{ secrets.GH_TOKEN }}
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_DASCHBOT_TOKEN }}

jobs:
publish-to-pypi:
publish-release-to-pypi:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
Expand All @@ -28,18 +25,15 @@ jobs:
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install
poetry self add poetry-exec-plugin
- name: bump version in pyproject.toml
run: poetry exec bump-version
- name: publish new version to PyPI
run: |
rm -rf dist/ build/
poetry build # generate distribution package
poetry publish # upload distribution package to PyPI
poetry build
poetry publish -u=__token__ -p=${{ secrets.PYPI_DASCHBOT_TOKEN }}

notification:
name: Google chat notification about release and published version
needs: [publish-to-pypi]
needs: [publish-release-to-pypi]
runs-on: ubuntu-latest
steps:
- name: Send notification to google chat room "DSP releases"
Expand Down