Skip to content

Commit

Permalink
Update finalize release workflow for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgur00 committed Jan 8, 2025
1 parent b7a2b99 commit b0c7e93
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 24 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/fetch_version_name_from_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ jobs:
name: Fetch Version Name
runs-on: ubuntu-latest
outputs:
version-name: ${{ steps.fetch_version_name.outputs.version_name }}
version-name: ${{ steps.fetch_version_name.outputs.version-name }}

steps:
- uses: actions/checkout@v4
with:
ref: "release-notes-test-9.9.9"
- name: Fetch version name from latest release notes
id: fetch_version_name
run: |
chmod +x scripts/fetch_release_notes_version_name.sh
commit_message="${{ github.event.head_commit.message }}"
commit_message="$(git log -1 --pretty=%B)"
VERSION_NAME=$(./scripts/fetch_release_notes_version_name.sh "${commit_message// /}")
echo -e "version-name=$VERSION_NAME" >> $GITHUB_OUTPUT
echo -e $VERSION_NAME
15 changes: 0 additions & 15 deletions .github/workflows/finalize_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,9 @@ name: Finalize release

on:
workflow_dispatch:
inputs:
version-name:
description: "Version name of the build"
required: true
type: string

jobs:
update_release_notes:
name: Update release notes
uses: ./.github/workflows/update_release_notes.yml
secrets: inherit
needs: fetch_version_name
with:
version-name: ${{ inputs.version-name }}
publish_github_release:
name: Update release notes
uses: ./.github/workflows/publish_github_release.yml
secrets: inherit
needs: [fetch_version_name, update_release_notes]
with:
version-name: ${{ inputs.version-name }}
34 changes: 27 additions & 7 deletions .github/workflows/update_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,33 @@ name: Update release notes
# Every time the workflow is triggered
on:
workflow_call:
inputs:
version-name:
required: true
type: string

jobs:
create_github_release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Create a Github release with release notes.
- name: Create Github release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION_NAME: "9.9.9"
with:
token: ${{ env.GITHUB_TOKEN }}
tag: ${{ env.VERSION_NAME }}
name: ${{ env.VERSION_NAME }}
draft: true

fetch_version_name:
needs: create_github_release
name: Fetch version name
uses: ./.github/workflows/fetch_version_name_from_release_notes.yml

fetch_updated_release_notes_file:
needs: fetch_version_name
name: Fetch Updated Release Notes File
runs-on: ubuntu-latest
outputs:
Expand All @@ -18,13 +38,13 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: "release-notes"
ref: "release-notes-test-9.9.9"

- name: Fetch filepath for updated release notes file
id: fetch_updated_release_notes_file
env:
PROJECT_ROOT: ${{ github.workspace }}
VERSION_NAME: ${{ inputs.version-name }}
VERSION_NAME: ${{ needs.fetch_version_name.outputs.version-name }}
run: |
chmod +x scripts/fetch_updated_release_notes_file.sh
UPDATED_RELEASE_NOTES_FILEPATH=$(./scripts/fetch_updated_release_notes_file.sh $PROJECT_ROOT $VERSION_NAME)
Expand All @@ -39,7 +59,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: "release-notes"
ref: "release-notes-test-9.9.9"

- name: Print updated release notes
run: |
Expand Down

0 comments on commit b0c7e93

Please sign in to comment.