-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Aligned github actions to develop
Signed-off-by: MMaiero <matteo.maiero@eurotech.com>
- Loading branch information
Showing
11 changed files
with
398 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,16 @@ | ||
Handlebars.registerHelper('firstLetters', function(input, options) { | ||
const number = parseInt(options.hash['number'] || "0") | ||
return input.substring(0,number); | ||
}); | ||
|
||
Handlebars.registerHelper('date', function() { | ||
const monthNames = ["January", "February", "March", "April", "May", "June", | ||
"July", "August", "September", "October", "November", "December" | ||
]; | ||
|
||
const date = new Date(); | ||
const month = monthNames[date.getMonth()]; | ||
const year = date.getYear() + 1900; | ||
|
||
return month + " " + year; | ||
}); |
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,71 @@ | ||
Eclipse Kura - {{extended.version}} - {{{date}}} | ||
------------------------------------------------------------------------------------------------- | ||
Description: | ||
[TODO] | ||
{{#issues}} | ||
{{! Features section }} | ||
{{#ifContainsType commits type='feat'}} | ||
Features: | ||
{{#commits}} | ||
{{#ifCommitType . type='feat'}} | ||
* {{firstLetters hash number='10'}} - {{#eachCommitScope .}}[{{.}}] {{/eachCommitScope}}{{{commitDescription .}}} ({{authorName}}) | ||
{{/ifCommitType}} | ||
{{/commits}} | ||
{{/ifContainsType}} | ||
{{! Target environments section }} | ||
Target Environments: | ||
[TODO] | ||
{{! Breaking changes section }} | ||
{{#ifContainsBreaking commits}} | ||
Breaking changes: | ||
{{#commits}} | ||
{{#ifCommitBreaking .}} | ||
* {{firstLetters hash number='10'}} - {{#eachCommitScope .}}[{{.}}] {{/eachCommitScope}}{{{commitDescription .}}} ({{authorName}}) | ||
{{/ifCommitBreaking}} | ||
{{/commits}} | ||
{{/ifContainsBreaking}} | ||
{{! Bug Fixes section }} | ||
{{#ifContainsType commits type='fix'}} | ||
Bug Fixes: | ||
{{#commits}} | ||
{{#ifCommitType . type='fix'}} | ||
* {{firstLetters hash number='10'}} - {{#eachCommitScope .}}[{{.}}] {{/eachCommitScope}}{{{commitDescription .}}} ({{authorName}}) | ||
{{/ifCommitType}} | ||
{{/commits}} | ||
{{/ifContainsType}} | ||
{{! Deprecated APIs section }} | ||
{{#ifContainsType commits type='deprecate'}} | ||
Deprecated APIs: | ||
{{#commits}} | ||
{{#ifCommitType . type='deprecate'}} | ||
* {{firstLetters hash number='10'}} - {{{commitDescription .}}} ({{authorName}}) | ||
{{/ifCommitType}} | ||
{{/commits}} | ||
{{/ifContainsType}} | ||
{{! Target Platform updates section }} | ||
{{#ifContainsType commits type='build'}} | ||
Target Platform Updates: | ||
{{#commits}} | ||
{{#ifCommitType . type='build'}} | ||
* {{firstLetters hash number='10'}} - {{{commitDescription .}}} ({{authorName}}) | ||
{{/ifCommitType}} | ||
{{/commits}} | ||
{{/ifContainsType}} | ||
{{! Known issues section }} | ||
Known Issues: | ||
[TODO] | ||
{{! Changelog section }} | ||
Changelog: | ||
{{#commits}} | ||
* {{firstLetters hash number='10'}} - {{{messageTitle}}} ({{authorName}}) | ||
{{/commits}} | ||
{{/issues}} |
23 changes: 23 additions & 0 deletions
23
.github/version_uptick_configs/uptick_major_on_develop_branch.yml
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,23 @@ | ||
--- | ||
exclusions: | ||
- "**/.git/**/*" | ||
- "**/.github/**/*" | ||
- "**/target/**/*" | ||
- "**/RELEASE_INFO/**/*" | ||
- "**/.settings/**/*" | ||
- "**/.classpath" | ||
- "**/.project" | ||
- "./kura/tools/archetype/example/src/main/resources/**/*" | ||
|
||
tasks: | ||
- selector: | ||
and: | ||
- snapshot | ||
- not: | ||
artifact_id: "moquette-broker" | ||
actions: | ||
- transform_version: | ||
- add_major: 1 | ||
- set_minor: 0 | ||
- set_patch: 0 |
22 changes: 22 additions & 0 deletions
22
.github/version_uptick_configs/uptick_minor_on_develop_branch.yml
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 @@ | ||
--- | ||
exclusions: | ||
- "**/.git/**/*" | ||
- "**/.github/**/*" | ||
- "**/target/**/*" | ||
- "**/RELEASE_INFO/**/*" | ||
- "**/.settings/**/*" | ||
- "**/.classpath" | ||
- "**/.project" | ||
- "./kura/tools/archetype/example/src/main/resources/**/*" | ||
|
||
tasks: | ||
- selector: | ||
and: | ||
- snapshot | ||
- not: | ||
artifact_id: "moquette-broker" | ||
actions: | ||
- transform_version: | ||
- add_minor: 1 | ||
- set_patch: 0 |
22 changes: 22 additions & 0 deletions
22
.github/version_uptick_configs/uptick_patch_on_maintenance_branch.yml
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 @@ | ||
--- | ||
exclusions: | ||
- "**/.git/**/*" | ||
- "**/.github/**/*" | ||
- "**/target/**/*" | ||
- "**/RELEASE_INFO/**/*" | ||
- "**/.settings/**/*" | ||
- "**/.classpath" | ||
- "**/.project" | ||
- "./kura/tools/archetype/example/src/main/resources/**/*" | ||
|
||
tasks: | ||
- selector: | ||
and: | ||
- release | ||
- not: | ||
artifact_id: "moquette-broker" | ||
actions: | ||
- transform_version: | ||
- add_patch: 1 | ||
- snapshot: set |
37 changes: 37 additions & 0 deletions
37
.github/version_uptick_configs/uptick_snapshot_to_patch_release.yml
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,37 @@ | ||
--- | ||
exclusions: | ||
- "**/.git/**/*" | ||
- "**/.github/**/*" | ||
- "**/target/**/*" | ||
- "**/RELEASE_INFO/**/*" | ||
- "**/.settings/**/*" | ||
- "**/.classpath" | ||
- "**/.project" | ||
- "./kura/tools/archetype/example/src/main/resources/**/*" | ||
|
||
tasks: | ||
- selector: | ||
or: | ||
- and: | ||
- group_id: "org.eclipse.kura" | ||
- artifact_id: "distrib" | ||
- and: | ||
- group_id: "org.eclipse.kura" | ||
- artifact_id: "tools" | ||
- and: | ||
- group_id: "org.eclipse.kura" | ||
- artifact_id: "target-platform" | ||
- and: | ||
- group_id: "org.eclipse.kura" | ||
- artifact_id: "examples" | ||
- and: | ||
- group_id: "org.eclipse.kura.tools" | ||
- artifact_id: "archetype" | ||
- and: | ||
- group_id: "org.eclipse.kura" | ||
- artifact_id: "kura" | ||
actions: | ||
- transform_version: | ||
- snapshot: remove | ||
|
21 changes: 21 additions & 0 deletions
21
.github/version_uptick_configs/uptick_snapshot_to_release.yml
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,21 @@ | ||
--- | ||
exclusions: | ||
- "**/.git/**/*" | ||
- "**/.github/**/*" | ||
- "**/target/**/*" | ||
- "**/RELEASE_INFO/**/*" | ||
- "**/.settings/**/*" | ||
- "**/.classpath" | ||
- "**/.project" | ||
- "./kura/tools/archetype/example/src/main/resources/**/*" | ||
|
||
tasks: | ||
- selector: | ||
and: | ||
- snapshot | ||
- not: | ||
artifact_id: "moquette-broker" | ||
actions: | ||
- transform_version: | ||
- snapshot: remove |
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: Backport | ||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
- labeled | ||
|
||
jobs: | ||
backport: | ||
name: Backport | ||
runs-on: ubuntu-latest | ||
# Only react to merged PRs for security reasons. | ||
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. | ||
if: > | ||
github.event.pull_request.merged | ||
&& ( | ||
github.event.action == 'closed' | ||
|| ( | ||
github.event.action == 'labeled' | ||
&& contains(github.event.label.name, 'backport') | ||
) | ||
) | ||
steps: | ||
- uses: tibdex/backport@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
title_template: "<%= title %> [backport <%= base %>]" | ||
|
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,60 @@ | ||
name: "Release Notes automation" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target_branch: | ||
type: string | ||
default: 'master' | ||
description: Target branch | ||
required: true | ||
starting_commit: | ||
type: string | ||
description: Commit from which to start generating the release notes | ||
required: true | ||
|
||
jobs: | ||
main: | ||
name: Generate Release Notes | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout target branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.target_branch }} | ||
fetch-depth: '0' | ||
|
||
- name: Get version | ||
id: get-version | ||
uses: JActions/maven-version@v1.0.1 | ||
with: | ||
pom: ./kura/pom.xml | ||
|
||
- name: Download git-changelog-command-line tool | ||
id: download-changelog-cli | ||
uses: clausnz/github-action-download-maven-artifact@master | ||
with: | ||
url: 'https://repo1.maven.org' | ||
repository: 'maven2' | ||
groupId: 'se.bjurr.gitchangelog' | ||
artifactId: 'git-changelog-command-line' | ||
version: '1.100.2' | ||
extension: 'jar' | ||
|
||
- name: Generate Release Notes | ||
run: | | ||
java -jar ${{ steps.download-changelog-cli.outputs.file }} \ | ||
-fc "${{ github.event.inputs.starting_commit }}" \ | ||
-ex "{\"version\":\"${{ steps.get-version.outputs.version }}\"}" \ | ||
-t .github/release_notes_template/template.hbs \ | ||
-hhf .github/release_notes_template/helper.hbs \ | ||
-of kura/distrib/RELEASE_NOTES.txt | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
title: "chore: add Kura ${{ steps.get-version.outputs.version }} release notes" | ||
commit-message: "chore: add Kura ${{ steps.get-version.outputs.version }} release notes" | ||
body: "Automated changes by _Release Notes automation_ action: add Kura ${{ steps.get-version.outputs.version }} version release notes" | ||
branch-suffix: short-commit-hash |
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,32 @@ | ||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
types: | | ||
fix | ||
feat | ||
docs | ||
refactor | ||
test | ||
style | ||
chore | ||
build | ||
ci | ||
revert | ||
perf | ||
deprecate | ||
requireScope: false |
Oops, something went wrong.