-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #12082: Github action Publish release notes outside
- Loading branch information
1 parent
ca99792
commit b519b15
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -508,6 +508,7 @@ gh | |
ghprb | ||
gitattributes | ||
github | ||
githubpage | ||
githubusercontent | ||
Gjs | ||
globbing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if [[ -z $1 ]]; then | ||
echo "version is not set" | ||
echo "Usage: publish-releasenotes-githubpage.sh <version>" | ||
exit 1 | ||
fi | ||
|
||
TARGET_VERSION=$1 | ||
echo TARGET_VERSION="$TARGET_VERSION" | ||
|
||
CURRENT_VERSION=$(xmlstarlet sel -N pom=http://maven.apache.org/POM/4.0.0 \ | ||
-t -m pom:project -v pom:version pom.xml | sed "s/-SNAPSHOT//") | ||
echo CURRENT_VERSION="$CURRENT_VERSION" | ||
|
||
if [ "$TARGET_VERSION" != "$CURRENT_VERSION" ]; then | ||
echo "[ERROR] Target Version and Current Version doesn't match." | ||
exit 1; | ||
fi | ||
|
||
# Update GitHub Release Page | ||
./.ci/update-github-page.sh "$TARGET_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
############################################################################# | ||
# GitHub Action to Publish Release Notes GitHub Page. | ||
# | ||
############################################################################# | ||
name: "Publish Release notes GitHub Page" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Target Version without (-SNAPSHOT)' | ||
required: true | ||
jobs: | ||
publish: | ||
name: Publish releasenotes GitHub Page ${{ github.event.inputs.version }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@v2 | ||
- name: Download xmlstarlet | ||
run: | | ||
sudo apt-get install xmlstarlet | ||
- name: Run Shell Script | ||
run: | | ||
./.ci/publish-releasenotes-githubpage.sh ${{ github.event.inputs.version }} |