Skip to content

ci: update release-please for release automation #36

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

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 31 additions & 5 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,40 @@ on:
- main
workflow_dispatch:

permissions:
id-token: write # for PYPI release

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.CI_RELEASE_PLEASE_TOKEN }}
release-type: simple
- name: Release
id: release
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.BOT_TOKEN }}

- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}

- name: Set up Python
uses: actions/setup-python@v3
if: ${{ steps.release.outputs.release_created }}
with:
python-version: '3.x'

- name: Install dependencies
if: ${{ steps.release.outputs.release_created }}
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
if: ${{ steps.release.outputs.release_created }}
run: python -m build

- name: Publish package
if: ${{ steps.release.outputs.release_created }}
uses: pypa/gh-action-pypi-publish@v1.8.14
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
13 changes: 13 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"extra-files": [
"src/commitlint/__version__.py"
]
}
},
"pull-request-header": "Release PR",
"pull-request-title-pattern": "chore: release v${version}",
"release-type": "simple"
}
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ keywords =
classifiers =
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
License :: OSI Approved :: GNU General Public License v3 (GPL-3.0)

url = https://github.com/opensource-nepal/commitlint
project_urls =
Expand Down
4 changes: 2 additions & 2 deletions src/commitlint/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
This module contains the version information of the current commitlint.
TODO: automatically bump version through CI.
NOTE: The version is auto-updated by release-please action.
"""

__version__ = "0.2.1"
__version__ = "0.2.1" # x-release-please-version
Loading