Skip to content

Commit 8e4ddc7

Browse files
committed
build: update release workflow to update versions.js in docs
1 parent 1e33b1f commit 8e4ddc7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ jobs:
5252
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
5353
- run: |
5454
mvn release:prepare -DskipTests -DpushChanges=false -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
55+
56+
# Get the release version from the release.properties file
57+
RELEASE_VERSION=$(grep "project.rel.dev.onvoid.webrtc\\\:webrtc-java=" release.properties | cut -d'=' -f2)
58+
echo "Extracted release version from release.properties: $RELEASE_VERSION"
59+
60+
# Update versions.js file
61+
echo "Updating versions.js with release version: $RELEASE_VERSION and development version: ${{ github.event.inputs.developmentVersion }}"
62+
sed -i "s/VERSION: '.*'/VERSION: '$RELEASE_VERSION'/g" docs/assets/versions.js
63+
sed -i "s/VERSION_SNAPSHOT: '.*'/VERSION_SNAPSHOT: '${{ github.event.inputs.developmentVersion }}'/g" docs/assets/versions.js
64+
65+
# Add the updated file to the existing commit
66+
git add docs/assets/versions.js
67+
git commit --amend --no-edit
68+
5569
git push
5670
git push --tags
5771

0 commit comments

Comments
 (0)