File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,10 +29,31 @@ jobs:
2929 - name : Run tests
3030 run : mvn test --file pom.xml
3131
32+ version :
33+
34+ needs : test
35+
36+ runs-on : ubuntu-latest
37+
38+ outputs :
39+ approved : ${{ steps.version.outputs.version }}
40+
41+ steps :
42+ - uses : actions/checkout@v2
43+ - name : Set up JDK 11
44+ uses : actions/setup-java@v5
45+ with :
46+ distribution : ' temurin'
47+ java-version : 11
48+ cache : ' maven'
49+ - name : version
50+ run : |
51+ mvn help:evaluate -Dexpression=project.version -q -DforceStdout >> $JCODINGS_VERSION
52+ echo "version=$JCODINGS_VERSION" >> $GITHUB_OUTPUT
3253
3354 snapshot :
3455
35- needs : test
56+ needs : [ test, version]
3657
3758 runs-on : ubuntu-latest
3859
4869 server-username : MAVEN_USERNAME
4970 server-password : MAVEN_PASSWORD
5071 - name : Publish package
51- run : mvn -B deploy
72+ run : mvn -ntp - B deploy
5273 env :
5374 MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
5475 MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
55- if : ${{ github.ref == 'refs/heads/master' && github.repository == 'jruby/jcodings' }}
76+ if : ${{ contains(jobs.version.outputs.version, 'SNAPSHOT') && github.ref == 'refs/heads/master' && github.repository == 'jruby/jcodings' }}
You can’t perform that action at this time.
0 commit comments