File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed
Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ release :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Notify Starting
12+ if : success()
13+ id : slack # IMPORTANT: reference this step ID value in future Slack steps
14+ env :
15+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
16+ 17+ with :
18+ channel : github-actions
19+ status : STARTING
20+ color : warning
21+
22+ - uses : actions/checkout@v2
23+ - name : Set up Maven Central Repository
24+ uses : actions/setup-java@v1
25+ with :
26+ java-version : 1.8
27+ server-id : ossrh
28+ server-username : MAVEN_USERNAME
29+ server-password : MAVEN_PASSWORD
30+
31+ - name : Build
32+ run : mvn -B package --file pom.xml
33+
34+ - name : Run Tests
35+ run : mvn test
36+
37+ - name : Publish package
38+ run : mvn -B deploy
39+ env :
40+ MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
41+ MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
42+
43+ - name : Notify slack success
44+ if : success()
45+ env :
46+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
47+ 48+ with :
49+ message_id : ${{ steps.slack.outputs.message_id }}
50+ channel : github-actions
51+ status : SUCCESS
52+ color : good
53+
54+ - name : Notify slack fail
55+ if : failure()
56+ env :
57+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
58+ 59+ with :
60+ message_id : ${{ steps.slack.outputs.message_id }}
61+ channel : github-actions
62+ status : FAILED
63+ color : danger
You can’t perform that action at this time.
0 commit comments