Add pulse listener manager #2
This file contains hidden or 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
| name: Snapshot Deploy | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Java 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Generate settings.xml | |
| run: | | |
| cat > ~/.m2/settings.xml << EOF | |
| <settings> | |
| <servers> | |
| <server> | |
| <id>repsy-snapshots</id> | |
| <username>${{ secrets.REPSY_USERNAME }}</username> | |
| <password>${{ secrets.REPSY_PASSWORD }}</password> | |
| </server> | |
| </servers> | |
| </settings> | |
| EOF | |
| - name: Deploy only snapshot versions | |
| run: | | |
| VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "Detected version: $VERSION" | |
| if [[ $VERSION == *"SNAPSHOT"* ]]; then | |
| echo "Deploying snapshot version: $VERSION" | |
| mvn deploy -U -B | |
| else | |
| echo "Skipping deploy for release version: $VERSION" | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |