|
3 | 3 | release:
|
4 | 4 | types: [created]
|
5 | 5 | jobs:
|
6 |
| - publish: |
| 6 | +# publish: |
| 7 | + # runs-on: ubuntu-latest |
| 8 | + # steps: |
| 9 | + # - uses: actions/checkout@v2 |
| 10 | + # - name: Set up Java and Maven |
| 11 | + # uses: actions/setup-java@v1 |
| 12 | + # with: |
| 13 | + # java-version: 1.8 |
| 14 | + # - name: change version to release version |
| 15 | + # # Assume that RELEASE_VERSION will have form like: "v1.0.1". So we cut the "v" |
| 16 | + # run: mvn versions:set -DnewVersion="${RELEASE_VERSION:1}" versions:commit |
| 17 | + # env: |
| 18 | + # RELEASE_VERSION: ${{ github.event.release.tag_name }} |
| 19 | + # # see: https://github.com/keybase/keybase-issues/issues/2798 |
| 20 | + # - name: Release Maven package |
| 21 | + # uses: samuelmeuli/action-maven-publish@v1 |
| 22 | + # with: |
| 23 | + # maven_profiles: "release" |
| 24 | + # gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} |
| 25 | + # gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} |
| 26 | + # nexus_username: ${{ secrets.OSSRH_USERNAME }} |
| 27 | + # nexus_password: ${{ secrets.OSSRH_TOKEN }} |
| 28 | + |
| 29 | + update-working-version: |
7 | 30 | runs-on: ubuntu-latest
|
8 | 31 | steps:
|
9 | 32 | - uses: actions/checkout@v2
|
10 |
| - - name: Set up Maven Central Repository |
| 33 | + - name: Set up Java and Maven |
11 | 34 | uses: actions/setup-java@v1
|
12 |
| - with: |
13 |
| - java-version: 1.8 |
| 35 | + with: |
| 36 | + java-version: 1.8 |
14 | 37 | - name: change version to release version
|
15 |
| - # Assume that RELEASE_VERSION will have form like: "v1.0.1". So we cut the "v" |
16 |
| - run: mvn versions:set -DnewVersion="${RELEASE_VERSION:1}" versions:commit |
17 |
| - env: |
18 |
| - RELEASE_VERSION: ${{ github.event.release.tag_name }} |
19 |
| - # see: https://github.com/keybase/keybase-issues/issues/2798 |
20 |
| - - name: Release Maven package |
21 |
| - uses: samuelmeuli/action-maven-publish@v1 |
22 |
| - with: |
23 |
| - maven_profiles: "release" |
24 |
| - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} |
25 |
| - gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} |
26 |
| - nexus_username: ${{ secrets.OSSRH_USERNAME }} |
27 |
| - nexus_password: ${{ secrets.OSSRH_TOKEN }} |
28 |
| - - name: Set version to next snapshot version |
29 |
| - run: mvn -q build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT versions:commit |
30 |
| - - name: Commit files |
31 | 38 | run: |
|
32 |
| - git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' |
33 |
| - git fetch --all |
34 |
| - git checkout master |
| 39 | + mvn versions:set -DnewVersion="${RELEASE_VERSION:1}" versions:commit |
| 40 | + mvn -q build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT versions:commit |
35 | 41 | git config --local user.email "action@github.com"
|
36 | 42 | git config --local user.name "GitHub Action"
|
37 | 43 | git commit -m "Set new SNAPSHOT version into pom files." -a
|
| 44 | + env: |
| 45 | + RELEASE_VERSION: ${{ github.event.release.tag_name }} |
38 | 46 | - name: Push changes
|
39 | 47 | uses: ad-m/github-push-action@master
|
40 | 48 | with:
|
|
0 commit comments