|
6 | 6 | name: Deploy and Publish
|
7 | 7 |
|
8 | 8 | on:
|
9 |
| - workflow_run: |
10 |
| - workflows: ["Build and Test"] |
| 9 | + push: |
| 10 | + branches: [ '**' ] |
| 11 | + pull_request: |
11 | 12 | branches: [ master ]
|
12 |
| - types: |
13 |
| - - completed |
14 | 13 |
|
15 | 14 | # Allows you to run this workflow manually from the Actions tab
|
16 | 15 | workflow_dispatch:
|
@@ -46,34 +45,14 @@ jobs:
|
46 | 45 |
|
47 | 46 | - name: Get the version tag
|
48 | 47 | id: get_version_tag
|
49 |
| - run: echo ::set-output name=SOURCE_TAG::$(echo $GITHUB_REF | cut -d / -f 3) |
| 48 | + run: echo ::set-output name=SOURCE_TAG::$(echo "v2.3.6" | cut -d / -f 3) |
50 | 49 |
|
51 | 50 | - name: Check if branch is a version tag
|
52 | 51 | id: new_release
|
53 | 52 | run: |
|
54 |
| - echo ::set-output name=NEW_RELEASE::$(echo ${{ github.ref }} | grep -ciP "refs/heads/v\K[0-9]+\.[0-9]+\.[0-9]+") |
| 53 | + echo ::set-output name=NEW_RELEASE::$(echo "refs/heads/v2.3.6" | grep -ciP "refs/heads/v\K[0-9]+\.[0-9]+\.[0-9]+") |
55 | 54 | echo ${{ steps.get_version_tag.outputs.SOURCE_TAG }}
|
56 | 55 |
|
57 |
| - - name: Publish/Deploy to Maven Central |
58 |
| - if: ${{ steps.new_release.outputs.NEW_RELEASE == 1}} |
59 |
| - env: |
60 |
| - SIGNING_KEY: ${{ secrets.SIGNING_KEY }} |
61 |
| - SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} |
62 |
| - SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} |
63 |
| - CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} |
64 |
| - CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} |
65 |
| - run: scripts/deploy_gha.sh |
66 |
| - |
67 |
| - - name: Publish/Deploy to Git |
68 |
| - if: ${{ steps.new_release.outputs.NEW_RELEASE == 1}} |
69 |
| - uses: marvinpinto/action-automatic-releases@latest |
70 |
| - with: |
71 |
| - repo_token: ${{ secrets.GH_TOKEN }} |
72 |
| - automatic_release_tag: ${{ steps.get_version_tag.outputs.SOURCE_TAG }} |
73 |
| - prerelease: false |
74 |
| - draft: false |
75 |
| - files: build/libs/watson-spring-boot-starter-${{ steps.get_version_tag.outputs.SOURCE_TAG }}-jar-with-dependencies.jar |
76 |
| - |
77 | 56 | - name: SKIP - Publish/Deploy to Git and Maven Central
|
78 | 57 | if: ${{ steps.new_release.outputs.NEW_RELEASE == 0}}
|
79 | 58 | run: |
|
|
0 commit comments