Skip to content

Commit

Permalink
Merge pull request #36 from aj3sh/release-please
Browse files Browse the repository at this point in the history
ci: update release-please for release automation
  • Loading branch information
aj3sh authored May 13, 2024
2 parents 158a690 + 8abab0d commit 1b79cc9
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 8 deletions.
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

0 comments on commit 1b79cc9

Please sign in to comment.