Skip to content

Commit

Permalink
Another attempt at fixing the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Dec 11, 2024
1 parent 39c7457 commit 123b269
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ jobs:
java-version: '17'
distribution: 'zulu'

- name: Install xmlstarlet
run: |
sudo apt-get update
sudo apt-get install -y xmlstarlet
- name: Cache Maven dependencies
uses: actions/cache@v2
with:
Expand All @@ -35,10 +30,16 @@ jobs:
- name: Build with Maven
run: mvn clean install -DskipTests

- name: Extract version from pom.xml

- name: Extract version from pom.xml using sed
id: version
run: |
VERSION=$(xmlstarlet sel -t -m "/project/version" -v . pom.xml)
VERSION=$(sed -n 's/.*<version>\([^<]*\)<\/version>.*/\1/p' pom.xml | head -n 1)
echo "Extracted VERSION: $VERSION"
if [[ -z "$VERSION" ]]; then
echo "Failed to extract version from pom.xml"
exit 1
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Check if the version already exists
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.keycloakify.keycloak</groupId>
<artifactId>keycloak-admin-events-logger</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.0.1</version>
<packaging>jar</packaging>

<properties>
Expand Down

0 comments on commit 123b269

Please sign in to comment.