@@ -10,70 +10,70 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
12
12
steps :
13
- - uses : actions/checkout@v2
14
- - uses : tibdex/github-app-token@v1
15
- id : generate-token
16
- with :
17
- app_id : ${{ secrets.APP_ID }}
18
- private_key : ${{ secrets.APP_PRIVATE_KEY }}
19
- - name : Set up Python 2.7
20
- uses : actions/setup-python@v2
21
- with :
22
- python-version : 2.7
23
- - name : Set up Java 8
24
- uses : actions/setup-java@v1
25
- with :
26
- java-version : 8
27
- server-id : ossrh
28
- server-username : MAVEN_USERNAME
29
- server-password : MAVEN_PASSWORD
30
- - name : Cache local Maven repository
31
- uses : actions/cache@v2
32
- with :
33
- path : ~/.m2/repository
34
- key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
35
- restore-keys : |
36
- ${{ runner.os }}-maven-
37
- - name : Run pre release script
38
- id : preRelease
39
- run : |
40
- # export GPG_TTY=$(tty)
41
- export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
42
- if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
43
- then
44
- echo "not releasing snapshot version: " ${MY_POM_VERSION}
45
- echo "::set-env name= RELEASE_OK:: no"
46
- else
47
- . ./CI/pre-release-v1.sh
48
- echo "::set-env name= RELEASE_OK:: yes"
49
- fi
50
- echo "::set-env name= SC_VERSION:: $SC_VERSION"
51
- echo "::set-env name= SC_NEXT_VERSION:: $SC_NEXT_VERSION"
52
- echo "::set-env name= SC_LAST_RELEASE:: $SC_LAST_RELEASE"
53
- - name : configure git user email
54
- run : |
55
- git config --global user.email "[email protected] "
56
- git config --global user.name "GitHub Action"
57
- git config --global hub.protocol https
58
- git remote set-url origin https://\${{ secrets.GITHUB_TOKEN }}:[email protected] /swagger-api/swagger-parser.git
59
- - name : Checkout v1
60
- uses : actions/checkout@v2
61
- with :
62
- ref : " v1"
63
- fetch-depth : 0
64
- - name : Run next snapshot script
65
- id : postRelease
66
- if : env.RELEASE_OK == 'yes'
67
- run : |
68
- . ./CI/post-nextsnap-v1.sh
69
- - name : Create Next Snapshot Pull Request
70
- uses : peter-evans/create-pull-request@v2
71
- if : env.RELEASE_OK == 'yes'
72
- with :
73
- token : ${{ steps.generate-token.outputs.token }}
74
- commit-message : bump snapshot ${{ env.SC_NEXT_VERSION }}-SNAPSHOT
75
- title : ' bump snapshot ${{ env.SC_NEXT_VERSION }}-SNAPSHOT'
76
- branch : bump-snap-${{ env.SC_NEXT_VERSION }}-SNAPSHOT
13
+ - uses : actions/checkout@v2
14
+ - uses : tibdex/github-app-token@v1
15
+ id : generate-token
16
+ with :
17
+ app_id : ${{ secrets.APP_ID }}
18
+ private_key : ${{ secrets.APP_PRIVATE_KEY }}
19
+ - name : Set up Python 2.7
20
+ uses : actions/setup-python@v2
21
+ with :
22
+ python-version : 2.7
23
+ - name : Set up Java 8
24
+ uses : actions/setup-java@v1
25
+ with :
26
+ java-version : 8
27
+ server-id : ossrh
28
+ server-username : MAVEN_USERNAME
29
+ server-password : MAVEN_PASSWORD
30
+ - name : Cache local Maven repository
31
+ uses : actions/cache@v2
32
+ with :
33
+ path : ~/.m2/repository
34
+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
35
+ restore-keys : |
36
+ ${{ runner.os }}-maven-
37
+ - name : Run pre release script
38
+ id : preRelease
39
+ run : |
40
+ # export GPG_TTY=$(tty)
41
+ export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
42
+ if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
43
+ then
44
+ echo "not releasing snapshot version: " ${MY_POM_VERSION}
45
+ echo "RELEASE_OK= no" >> $GITHUB_ENV
46
+ else
47
+ . ./CI/pre-release-v1.sh
48
+ echo "RELEASE_OK= yes" >> $GITHUB_ENV
49
+ fi
50
+ echo "SC_VERSION= $SC_VERSION" >> $GITHUB_ENV
51
+ echo "SC_NEXT_VERSION= $SC_NEXT_VERSION" >> $GITHUB_ENV
52
+ echo "SC_LAST_RELEASE= $SC_LAST_RELEASE" >> $GITHUB_ENV
53
+ - name : configure git user email
54
+ run : |
55
+ git config --global user.email "[email protected] "
56
+ git config --global user.name "GitHub Action"
57
+ git config --global hub.protocol https
58
+ git remote set-url origin https://\${{ secrets.GITHUB_TOKEN }}:[email protected] /swagger-api/swagger-parser.git
59
+ - name : Checkout v1
60
+ uses : actions/checkout@v2
61
+ with :
62
+ ref : " v1"
63
+ fetch-depth : 0
64
+ - name : Run next snapshot script
65
+ id : postRelease
66
+ if : env.RELEASE_OK == 'yes'
67
+ run : |
68
+ . ./CI/post-nextsnap-v1.sh
69
+ - name : Create Next Snapshot Pull Request
70
+ uses : peter-evans/create-pull-request@v2
71
+ if : env.RELEASE_OK == 'yes'
72
+ with :
73
+ token : ${{ steps.generate-token.outputs.token }}
74
+ commit-message : bump snapshot ${{ env.SC_NEXT_VERSION }}-SNAPSHOT
75
+ title : ' bump snapshot ${{ env.SC_NEXT_VERSION }}-SNAPSHOT'
76
+ branch : bump-snap-${{ env.SC_NEXT_VERSION }}-SNAPSHOT
77
77
78
78
env :
79
79
MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
0 commit comments