|
8 | 8 | name: Release Pipeline |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - build: |
| 11 | + publish: |
12 | 12 | runs-on: ubuntu-latest |
13 | | - |
| 13 | + timeout-minutes: 30 |
| 14 | + env: |
| 15 | + JDK_VER: 11 |
| 16 | + OSSRH_USER_TOKEN: ${{ secrets.OSSRH_USER_TOKEN }} |
| 17 | + OSSRH_PWD_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }} |
| 18 | + GPG_KEY: ${{ secrets.GPG_KEY }} |
| 19 | + GPG_PWD: ${{ secrets.GPG_PWD }} |
14 | 20 | steps: |
15 | 21 | - uses: actions/checkout@v2 |
16 | | - |
17 | 22 | - name: Set up JDK 11 |
18 | 23 | uses: actions/setup-java@v2 |
19 | 24 | with: |
@@ -66,45 +71,15 @@ jobs: |
66 | 71 | if: env.UNIT_TEST_FAILED == 'true' |
67 | 72 | run: exit 1 |
68 | 73 |
|
69 | | - # TODO: Move the sidecar into a central image repository |
70 | | - - name: Initialize Durable Task Sidecar |
71 | | - run: docker run --name durabletask-sidecar -p 4001:4001 --env 'DURABLETASK_SIDECAR_LOGLEVEL=Debug' -d peterstone2019/durabletask-sidecar:latest start --backend Emulator |
72 | | - |
73 | | - - name: Display Durable Task Sidecar Logs |
74 | | - run: nohup docker logs --since=0 durabletask-sidecar > durabletask-sidecar.log 2>&1 & |
75 | | - |
76 | | - # wait for 10 seconds, so sidecar container can be fully up, this will avoid intermittent failing issues for integration tests causing by failed to connect to sidecar |
77 | | - - name: Wait for 10 seconds |
78 | | - run: sleep 10 |
79 | | - |
80 | | - - name: Integration Tests with Gradle |
81 | | - run: ./gradlew integrationTest || echo "TEST_FAILED=true" >> $GITHUB_ENV |
82 | | - continue-on-error: true |
83 | | - |
84 | | - - name: Kill Durable Task Sidecar |
85 | | - run: docker kill durabletask-sidecar |
86 | | - |
87 | | - - name: Upload Durable Task Sidecar Logs |
88 | | - uses: actions/upload-artifact@v4 |
89 | | - with: |
90 | | - name: Durable Task Sidecar Logs |
91 | | - path: durabletask-sidecar.log |
92 | | - |
93 | | - - name: Archive test report |
94 | | - uses: actions/upload-artifact@v4 |
95 | | - with: |
96 | | - name: Integration test report |
97 | | - path: client/build/reports/tests/integrationTest |
98 | | - |
99 | 74 | - name: Upload JAR output |
100 | 75 | uses: actions/upload-artifact@v4 |
101 | 76 | with: |
102 | 77 | name: Package |
103 | 78 | path: client/build/libs |
104 | 79 |
|
105 | | - - name: Fail the job if tests failed |
106 | | - if: env.TEST_FAILED == 'true' |
107 | | - run: exit 1 |
108 | | - |
109 | | - - name: Publish to local |
110 | | - run: ./gradlew publish |
| 80 | + - name: Publish to ossrh |
| 81 | + run: | |
| 82 | + echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg |
| 83 | + export GPG_TTY=$(tty) |
| 84 | + gpg --batch --import private-key.gpg |
| 85 | + ./gradlew publish |
0 commit comments