Merge pull request #2 from aligent/chore/link-adobe-cloud-manager-to-… #12
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: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| build: | |
| if: "!contains(github.event.head_commit.message, 'skip ci')" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| # full history required to find git tags for version computation | |
| fetch-depth: 0 | |
| - name: set up java 8 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '8' | |
| distribution: temurin | |
| cache: maven | |
| # writes a 'github' server entry into ~/.m2/settings.xml for deploy | |
| server-id: github | |
| server-username: GITHUB_ACTOR | |
| server-password: GITHUB_TOKEN | |
| - name: get version | |
| id: version | |
| run: | | |
| TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "1.0.0") | |
| COUNT=$(git rev-list "${TAG}..HEAD" --count 2>/dev/null || git rev-list --count HEAD) | |
| echo "revision=${TAG}.${COUNT}" >> $GITHUB_OUTPUT | |
| - name: build and test | |
| run: mvn package -B -Drevision=${{ steps.version.outputs.revision }} -Dsurefire.excludes=**/ResolverUtilTest.java | |
| - name: deploy to github packages | |
| if: github.ref == 'refs/heads/master' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| run: | | |
| mvn deploy -B -DskipTests \ | |
| -Drevision=${{ steps.version.outputs.revision }} \ | |
| -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/${{ github.repository }} |