Skip to content
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

ci: Integrate Release-please action and config #67

Merged
merged 11 commits into from
Dec 17, 2024
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.
Loading