-
Notifications
You must be signed in to change notification settings - Fork 32
Migrate changelog workflows to unified release-notes reusable workflow #1237
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
base: main
Are you sure you want to change the base?
Changes from all commits
8c9f117
25869ea
029efdb
9cb7602
48f70a0
82b43d2
854940f
a47fa67
51c7361
fd0707f
174e548
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Changelog file | ||
| on: | ||
| workflow_run: | ||
| # Must match the `name:` field of the release-notes workflow in this repo. | ||
| workflows: ["release-notes"] | ||
| types: [completed] | ||
| permissions: {} | ||
| jobs: | ||
| changelog-file: | ||
| uses: elastic/docs-actions/.github/workflows/release-notes-changelog-file.yml@v1 | ||
| permissions: | ||
| pull-requests: write | ||
| actions: read |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Changelog PR comments | ||
| on: | ||
| workflow_run: | ||
| # Must match the `name:` field of the release-notes workflow in this repo. | ||
| workflows: ["release-notes"] | ||
| types: [completed] | ||
| permissions: {} | ||
| # The PR number is stable; do not cancel — two upstreams can complete close | ||
| # together and cancelling mid-upsert risks leaving the wrong comment body. | ||
| concurrency: | ||
| group: changelog-comments-${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }} | ||
| cancel-in-progress: false | ||
| jobs: | ||
| comment: | ||
| if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'cancelled' | ||
| uses: elastic/docs-actions/.github/workflows/release-notes-comments.yml@v1 | ||
| permissions: | ||
| pull-requests: write | ||
| actions: read | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| name: release-notes | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, edited, labeled, unlabeled] | ||
| push: | ||
| branches: [main] | ||
| permissions: {} | ||
| jobs: | ||
| release-notes: | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| packages: read | ||
| uses: elastic/docs-actions/.github/workflows/release-notes.yml@v1 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it only checking the PR has a changelog file and/or the appropriate labels are applied here ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On a PR event it always validates labels, checks whether a changelog file is present (if the labels and workflow config require one), and if a file is present validates its name format and contents. On push to main it uploads the merged PR's changelog entry to the CDN. Bundle creation is separate, handled by |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -262,3 +262,47 @@ jobs: | |
| --verify-tag \ | ||
| --title="Release ${{ env.RELEASE_VERSION }}" \ | ||
| --notes='${{needs.generate-release-notes.outputs.notes}}' | ||
|
|
||
| bundle: | ||
| name: "Generate changelog bundle" | ||
| needs: create-github-release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: read | ||
| pull-requests: read | ||
| outputs: | ||
| bundle-path: ${{ steps.create.outputs.bundle-path }} | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| ref: ${{ inputs.ref }} | ||
| persist-credentials: false | ||
| - name: Generate bundle description | ||
| id: description | ||
| run: echo "text=$(.ci/changelog-bundle-description.sh)" >> "$GITHUB_OUTPUT" | ||
| - name: Create bundle | ||
| id: create | ||
| uses: elastic/docs-actions/changelog/bundle-create-version@v1 | ||
| with: | ||
| version: ${{ env.RELEASE_VERSION_TAG }} | ||
| description: ${{ steps.description.outputs.text }} | ||
| github-token: ${{ github.token }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To implement #1238 would it be just a matter of modifying the bundle file just between those two steps ? Or is it something we would need to do on a separate workflow ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The plan is to add a
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done — elastic/docs-actions#367 adds a |
||
|
|
||
| bundle-publish: | ||
| name: "Publish changelog bundle to S3" | ||
| needs: bundle | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| packages: read | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| ref: ${{ inputs.ref }} | ||
| persist-credentials: false | ||
| - name: Publish bundle to S3 | ||
| uses: elastic/docs-actions/changelog/bundle-publish@v1 | ||
| with: | ||
| bundle-path: ${{ needs.bundle.outputs.bundle-path }} | ||
Uh oh!
There was an error while loading. Please reload this page.