-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: release with release please (#303)
Release troncos with release-please. Requires the use of conventional commits. Release please create a release PR with a changelog. When this is merged the Release workflow will trigger and upload the package.
- Loading branch information
1 parent
1b347cd
commit c9fadce
Showing
7 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "[lint] Commit is conventional" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- edited | ||
- opened | ||
- ready_for_review | ||
- reopened | ||
- synchronize | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
pull-requests: write | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
uses: kolonialno/actions/.github/workflows/pr-conventional-commit.yml@main |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: "[release] Please" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- ci/test-release-please** | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
config-file: release-please-config.json | ||
manifest-file: .release-please-manifest.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
default_install_hook_types: [pre-commit, commit-msg] | ||
repos: | ||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook | ||
rev: "v9.11.0" | ||
hooks: | ||
- id: commitlint | ||
stages: [commit-msg] | ||
additional_dependencies: ["@commitlint/config-conventional"] | ||
args: | ||
- "--config=commitlint.config.js" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "4.4.1" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!--pytest-codeblocks:skipfile--> | ||
# CONTRIBUTING | ||
|
||
## Set-up | ||
|
||
```shell | ||
pre-commit install | ||
poetry install | ||
``` | ||
|
||
## Release | ||
|
||
We use [release-please](https://github.com/googleapis/release-please) to automate release including semver version based on [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/). | ||
|
||
Manually create a release PR from main branch | ||
|
||
```bash | ||
release-please release-pr \ | ||
--token=$(gh auth token) \ | ||
--repo-url=kolonialno/troncos | ||
--dry-run | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
rules: { | ||
"footer-max-line-length": [0, "always"], // ignore rule | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
"bootstrap-sha": "8ed4b839a6c7808f551baea9284eb7e36be7ef58", | ||
"include-v-in-tag": false, | ||
"separate-pull-requests": true, | ||
"prerelease": true, | ||
"packages": { | ||
".": { | ||
"component": "troncos", | ||
"bump-minor-pre-major": true, | ||
"include-component-in-tag": false, | ||
"release-type": "python" | ||
} | ||
} | ||
} |