Commit 4f350ba2 authored by Gyanendra Mishra's avatar Gyanendra Mishra Committed by GitHub

ci: convert to release please (#48)

parent 49948e84
version: 2.1 version: 2.1
orbs: orbs:
kurtosis-docs-checker: kurtosis-tech/docs-checker@0.2.1 kurtosis-docs-checker: kurtosis-tech/docs-checker@0.2.3
executors: executors:
ubuntu_vm: ubuntu_vm:
...@@ -39,6 +39,7 @@ workflows: ...@@ -39,6 +39,7 @@ workflows:
jobs: jobs:
# -- PR check jobs ------------------------------------------ # -- PR check jobs ------------------------------------------
- kurtosis-docs-checker/check-docs: - kurtosis-docs-checker/check-docs:
should-check-changelog: false
markdown-link-check-config-json: "{}" markdown-link-check-config-json: "{}"
filters: filters:
branches: branches:
...@@ -51,4 +52,4 @@ workflows: ...@@ -51,4 +52,4 @@ workflows:
filters: filters:
branches: branches:
ignore: ignore:
- master - master
\ No newline at end of file
# This is used by the pr-description-update action
# to trim trailing newlines and spaces in pr descriptions
import sys
def remove():
line = sys.argv[1]
return line.strip()
if __name__ == "__main__":
print(remove())
# Check PR title for conventional commits
name: Check PR title
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
# cancel redundant builds
concurrency:
group: "title-checker-${{ github.head_ref }}"
cancel-in-progress: true
jobs:
title_check:
runs-on: ubuntu-latest
steps:
- uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: "Update Pull Request Description with conventional commits"
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
# cancel redundant builds
concurrency:
group: "update-pr-${{ github.head_ref }}"
cancel-in-progress: true
jobs:
update_pr:
if: contains(github.head_ref, 'release-please') != true
runs-on: ubuntu-latest
steps:
- uses: 8BitJonny/gh-get-current-pr@2.2.0
with:
sha: ${{ github.event.pull_request.head.sha }}
id: PR
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
pr_body='${{ steps.PR.outputs.pr_body }}'
delimiter="Changelog picked up from commits here:"
cleaned_body="${pr_body%${delimiter}*}"
cleaned_body_without_trailing_space="$(python .github/remove_trailing_space.py "${cleaned_body}")"
conventional_commits="$(git log --pretty=format:"%B" origin/master..HEAD | grep -Pio '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|¯\\_\(ツ\)_\/¯)(\(\w+\)?((?=:\s)|(?=!:\s)))?(!)?(:\s.*)?(\n\n.*)?$' | grep ':' || true)"
echo "CONVENTIONAL_COMMITS<<EOF" >> $GITHUB_ENV
echo "${cleaned_body_without_trailing_space}" >> ${GITHUB_ENV}
if [ ${#conventional_commits} -gt 0 ]; then
echo "" >> ${GITHUB_ENV}
echo "${delimiter}" >> ${GITHUB_ENV}
echo "" >> ${GITHUB_ENV}
echo "${conventional_commits}" >> $GITHUB_ENV
fi
echo 'EOF'>> $GITHUB_ENV
- uses: tzkhan/pr-update-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# added this though it isn't used
base-branch-regex: '[a-z\d-_.\\/]+'
body-template: |
${{ env.CONVENTIONAL_COMMITS }}
body-update-action: 'replace'
body-uppercase-base-match: false
on:
push:
branches: [master]
name: release-please
jobs:
release-please:
name: "Release please"
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: simple
package-name: kurtosis
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
# Our CI, Docker Images, Kurtosis-SDK bumps all depend on
# non v tags
include-v-in-tag: false
# A wrapper workflow that calls down to Kurtosis Release workflow repo
name: Release Workflow
on:
workflow_dispatch:
inputs:
bump_major:
description: 'Do you want to bump the MAJOR version ("X" in "X.Y.Z") on this release?'
required: true
type: boolean
jobs:
release:
uses: kurtosis-tech/release/.github/workflows/release.yml@master
with:
bump_major: ${{ inputs.bump_major }}
secrets: inherit
\ No newline at end of file
# TBD
# 0.2.0 # 0.2.0
- Adds config variables for `genesis_delay` and `capella_fork_epoch` - Adds config variables for `genesis_delay` and `capella_fork_epoch`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment