Skip to content

Commit

Permalink
ci: merge release notification action (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzamahmood authored Apr 2, 2024
1 parent 894ec1f commit 1a1cc33
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Build source and wheel distributions
run: |
python -m pip install --upgrade build twine
python -m build
twine check --strict dist/*
- name: Publish distribution to PyPI
id: release
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_TOKEN }}

- name: Create tag
if: steps.release.outputs.exit_code == 0
id: tag_version
Expand All @@ -38,10 +42,20 @@ jobs:
github_token: ${{ secrets.TAGS_TOKEN }}
custom_tag: ${{ github.event.inputs.Version }}
tag_prefix: ""

- name: Create changelog for the release
if: steps.release.outputs.exit_code == 0
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release Version ${{ github.event.inputs.Version }}
body: ${{ steps.tag_version.outputs.changelog }}

- name: Send slack notification
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'C012YFE3D6D'
slack-message: "core-lib-python release has been triggered!"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
19 changes: 0 additions & 19 deletions .github/workflows/release-notification.yml

This file was deleted.

0 comments on commit 1a1cc33

Please sign in to comment.