Skip to content

Commit

Permalink
Do versioning during release
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws committed Dec 10, 2024
1 parent e3412fb commit 3b46d17
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ jobs:
VERSION_NUMBER: ${{ github.event.inputs.version_number }}
COMMIT_ID: ${{ github.event.inputs.commit_id }}
run: git checkout -b "$VERSION_NUMBER" "$COMMIT_ID"
- name: Update version number in source files
env:
VERSION_NUMBER: ${{ github.event.inputs.version_number }}
REPO_NAME: ${{ github.event.repository.name }}
source_folder_list: "source test"
run: |
echo "${{ env.source_folder_list }}" | \
xargs -n 1 sh -c \
'find $1 -type f \( -name "*.c" -o -name "*.h" \) \
-exec sed -i -b -E "0,/^ \* $REPO_NAME/s/^ \* $REPO_NAME.*/ \* $REPO_NAME $VERSION_NUMBER/g" {} +'
git add .
git commit -m '[AUTO][RELEASE]: Update version number in source files'
git push -u origin "$VERSION_NUMBER"
- name: Generate SBOM
uses: FreeRTOS/CI-CD-Github-Actions/sbom-generator@main
with:
Expand Down

0 comments on commit 3b46d17

Please sign in to comment.