Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from shaishap/main
Browse files Browse the repository at this point in the history
Automated tag creation and maven deploy
  • Loading branch information
tamarafischer authored Oct 10, 2023
2 parents 7559565 + 7ea3c36 commit 3aa70cb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ jobs:

runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write

steps:
- uses: actions/checkout@v3
# - name: Set up JDK 11
# uses: actions/setup-java@v3
# with:
# distribution: 'temurin'
# java-version: '11'

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
Expand All @@ -42,10 +37,15 @@ jobs:

- name: Get package version
run: |
PKGVER=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)
# mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version
# PKGVER=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version | grep -v INFO | grep -E "\d")
echo "VER=$PKGVER"
git tag -d "$PKGVER" || true
git tag -a -m "auto-created by CI" "$PKGVER"
git config --global user.email "${ACTOR_EMAIL}"
git config --global user.name "${ACTOR_NAME}"
PKG_VER=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)
echo "VER=$PKG_VER"
git tag -d "$PKG_VER" || true
git push origin --delete "$PKG_VER" || true
git tag -a -m "auto-created by CI" "$PKG_VER"
git push origin --tags
env:
ACTOR_NAME: ${{ github.event.pusher.name }}
ACTOR_EMAIL: ${{ github.event.pusher.email }}
GH_TOKEN: ${{ github.token }}

0 comments on commit 3aa70cb

Please sign in to comment.