Skip to content

Commit

Permalink
ci: Integrate Release-please action and config (#67)
Browse files Browse the repository at this point in the history
* First iteration of release-please action and config

* fix: add schema to release please config

* Remove old changelog actions

* ci: add PR title linter

* ci: trigger release please on develop only

* ci: workflow to merge main into develop automatically

* fix: double key in ci merge main

* ci: move name up for release please

* docs: add an initial ruleset for better Github release notes

* remove comments and fix schema

* add comment
  • Loading branch information
JesperDramsch authored Dec 17, 2024
1 parent a31d762 commit 01eb9fe
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 64 deletions.
21 changes: 21 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .github/release.yml
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

changelog:
exclude:
labels:
- ignore-for-release
- no-changelog

authors:
- pre-commit-ci[bot]
categories:
- title: Breaking Changes 🛠
labels:
- breaking-change
- title: Exciting New Features 🎉
labels:
- enhancement
- title: Other Changes
labels:
- "*"
18 changes: 0 additions & 18 deletions .github/workflows/changelog-pr-update.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/changelog-release-update.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/merge-main-into-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Merge main into develop
on:
push:
branches:
- main


permissions:
# Needed to read branches
contents: read
# Needed to create PR's
pull-requests: write

jobs:
sync-branches:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Opening pull request
id: pull
uses: jdtx0/branch-sync@1.5.1
with:
GITHUB_TOKEN: ${{ secrets.REPO_SYNC_ACTION_PAT }}
FROM_BRANCH: "main"
TO_BRANCH: "develop"
PULL_REQUEST_AUTO_MERGE_METHOD: "merge"
21 changes: 21 additions & 0 deletions .github/workflows/pr-conventional-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Ensure Conventional Commit in PR title"

on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run Release Please
on:
push:
branches:
- develop

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.REPO_SYNC_ACTION_PAT }}
# optional. customize path to .release-please-config.json
config-file: .release-please-config.json
# Currently releases are done "from main" to have a stable branch
target-branch: main
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ bar
*.grib
*.nc
*.npz
*.json
*.zarr/
~$images.pptx
test.py
Expand Down
14 changes: 14 additions & 0 deletions .release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"release-type": "python",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"separate-pull-requests": true,
"always-update": true,
"changelog-type": "github",
"packages": {
".": {
"package-name": "anemoi-utils"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
Empty file added .release-please-manifest.json
Empty file.

0 comments on commit 01eb9fe

Please sign in to comment.