|
|
|
@ -59,9 +59,16 @@ jobs: |
|
|
|
|
- name: Checkout Grafana |
|
|
|
|
uses: actions/checkout@v4 |
|
|
|
|
with: |
|
|
|
|
ref: ${{ inputs.target }} |
|
|
|
|
fetch-depth: 0 |
|
|
|
|
fetch-tags: true |
|
|
|
|
|
|
|
|
|
- name: Checkout Grafana (main) |
|
|
|
|
uses: actions/checkout@v4 |
|
|
|
|
with: |
|
|
|
|
ref: km/fix-release-pr-target |
|
|
|
|
fetch-depth: '0' |
|
|
|
|
fetch-tags: 'false' |
|
|
|
|
path: .grafana-main |
|
|
|
|
- name: Configure git user |
|
|
|
|
run: | |
|
|
|
|
git config --local user.name "github-actions[bot]" |
|
|
|
@ -70,15 +77,13 @@ jobs: |
|
|
|
|
|
|
|
|
|
- name: Create branch |
|
|
|
|
run: git checkout -b "release/${{ github.run_id }}/${{ inputs.version }}" |
|
|
|
|
|
|
|
|
|
- name: Generate changelog |
|
|
|
|
id: changelog |
|
|
|
|
uses: ./.github/workflows/actions/changelog |
|
|
|
|
uses: ./.grafana-main/.github/workflows/actions/changelog |
|
|
|
|
with: |
|
|
|
|
github_token: ${{ steps.generate_token.outputs.token }} |
|
|
|
|
target: v${{ inputs.version }} |
|
|
|
|
output_file: changelog_items.md |
|
|
|
|
|
|
|
|
|
- name: Patch CHANGELOG.md |
|
|
|
|
run: | |
|
|
|
|
# Prepare CHANGELOG.md content with version delimiters |
|
|
|
@ -112,16 +117,16 @@ jobs: |
|
|
|
|
git diff CHANGELOG.md |
|
|
|
|
|
|
|
|
|
- name: Commit CHANGELOG.md changes |
|
|
|
|
run: git commit --allow-empty -m "Update changelog placeholder" CHANGELOG.md |
|
|
|
|
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md |
|
|
|
|
|
|
|
|
|
- name: Update package.json versions |
|
|
|
|
uses: ./pkg/build/actions/bump-version |
|
|
|
|
uses: ./.grafana-main/pkg/build/actions/bump-version |
|
|
|
|
with: |
|
|
|
|
version: ${{ inputs.version }} |
|
|
|
|
version: 'patch' |
|
|
|
|
|
|
|
|
|
- name: Add package.json changes |
|
|
|
|
run: | |
|
|
|
|
git add . |
|
|
|
|
git add package.json lerna.json yarn.lock packages public |
|
|
|
|
git commit -m "Update version to ${{ inputs.version }}" |
|
|
|
|
|
|
|
|
|
- name: Git push |
|
|
|
@ -133,6 +138,7 @@ jobs: |
|
|
|
|
run: > |
|
|
|
|
gh pr create \ |
|
|
|
|
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \ |
|
|
|
|
-l "no-changelog" \ |
|
|
|
|
--dry-run=${{ inputs.dry_run }} \ |
|
|
|
|
-B "${{ inputs.target }}" \ |
|
|
|
|
--title "Release: ${{ inputs.version }}" \ |
|
|
|
@ -146,6 +152,7 @@ jobs: |
|
|
|
|
gh pr create \ |
|
|
|
|
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \ |
|
|
|
|
-l "product-approved" \ |
|
|
|
|
-l "no-changelog" \ |
|
|
|
|
--dry-run=${{ inputs.dry_run }} \ |
|
|
|
|
-B "${{ inputs.target }}" \ |
|
|
|
|
--title "Release: ${{ inputs.version }}" \ |
|
|
|
|