|
49 | 49 | push: |
50 | 50 | branches: [ main ] |
51 | 51 | jobs: |
52 | | -# publish: |
53 | | -# |
54 | | -# runs-on: ubuntu-latest |
55 | | -# |
56 | | -# permissions: |
57 | | -# contents: read |
58 | | -# packages: write |
59 | | -# |
60 | | -# steps: |
61 | | -# - uses: actions/checkout@v3 |
62 | | -# |
63 | | -# - name: Set up JDK 17 |
64 | | -# uses: actions/setup-java@v3 |
65 | | -# with: |
66 | | -# java-version: '17' |
67 | | -# distribution: 'temurin' |
68 | | -# server-id: github |
69 | | -# # settings-path: ${{ github.workspace }} # location for the settings.xml file |
70 | | -# # - name: Build with Maven |
71 | | -# # run: mvn -B package --file pom.xml |
72 | | -# |
73 | | -# - name: Publish package |
74 | | -# run: mvn --batch-mode deploy -Dmaven.test.skip |
75 | | -# env: |
76 | | -# GITHUB_TOKEN: ${{ secrets.TOKEN }} |
| 52 | + |
| 53 | + # publish: |
| 54 | + # |
| 55 | + # runs-on: ubuntu-latest |
| 56 | + # |
| 57 | + # permissions: |
| 58 | + # contents: read |
| 59 | + # packages: write |
| 60 | + # |
| 61 | + # steps: |
| 62 | + # - uses: actions/checkout@v3 |
| 63 | + # |
| 64 | + # - name: Set up JDK 17 |
| 65 | + # uses: actions/setup-java@v3 |
| 66 | + # with: |
| 67 | + # java-version: '17' |
| 68 | + # distribution: 'temurin' |
| 69 | + # server-id: github |
| 70 | + # # settings-path: ${{ github.workspace }} # location for the settings.xml file |
| 71 | + # # - name: Build with Maven |
| 72 | + # # run: mvn -B package --file pom.xml |
| 73 | + # |
| 74 | + # - name: Publish package |
| 75 | + # run: mvn --batch-mode deploy -Dmaven.test.skip |
| 76 | + # env: |
| 77 | + # GITHUB_TOKEN: ${{ secrets.TOKEN }} |
77 | 78 |
|
78 | 79 |
|
79 | 80 | release-on-push: |
|
87 | 88 | bump_version_scheme: minor |
88 | 89 | tag_prefix: "" |
89 | 90 |
|
90 | | - - name: Check Output Parameters |
| 91 | + |
| 92 | + publish: |
| 93 | + |
| 94 | + runs-on: ubuntu-latest |
| 95 | + |
| 96 | + permissions: |
| 97 | + contents: read |
| 98 | + packages: write |
| 99 | + |
| 100 | + steps: |
| 101 | + - uses: actions/checkout@v3 |
| 102 | + |
| 103 | + - name: Set up JDK 11 |
| 104 | + uses: actions/setup-java@v3 |
| 105 | + with: |
| 106 | + java-version: '11' |
| 107 | + distribution: 'temurin' |
| 108 | + server-id: github |
| 109 | + |
| 110 | + - name: Prepare and tag |
91 | 111 | run: | |
92 | | - echo "Got tag name ${{ steps.release.outputs.tag_name }}" |
93 | | - echo "Got release version ${{ steps.release.outputs.version }}" |
| 112 | + git config user.name serhii-petrenko |
| 113 | + git config user.email spetrenko@gmail.com |
| 114 | + |
| 115 | + mvn -V -B release:prepare -DtagNameFormat=@{project.version} -Darguments=-DskipTests -DpushChanges=false |
| 116 | + mvn -V -B release:clean |
| 117 | + git push |
| 118 | + git push --tags |
| 119 | + env: |
| 120 | + GITHUB_TOKEN: ${{ secrets.TOKEN }} |
| 121 | + MAVEN_USERNAME: serhii-petrenko |
| 122 | + MAVEN_PASSWORD: ${{ secrets.TOKEN }} |
0 commit comments