Skip to content

Commit

Permalink
build: run CI on release
Browse files Browse the repository at this point in the history
  • Loading branch information
npepinpe committed Jun 29, 2023
1 parent d98c983 commit 1365034
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- '.github/workflows/lint.yml'
workflow_dispatch: { }
merge_group: { }
workflow_call: { }

concurrency:
# add a sub-key using the run ID whenever this is called via workflow dispatch (i.e. manually by a user); in that
Expand All @@ -40,7 +41,7 @@ jobs:
secrets: inherit
deploy:
# Only deploy SNAPSHOT if merging to main
if: github.ref == 'refs/heads/main'
if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'workflow_call' }}
name: Deploy SNAPSHOT
needs: [lint, test]
uses: ./.github/workflows/deploy.yml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ jobs:
maven-url: oss.sonatype.org
maven-gpg-passphrase: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_PASSPHRASE }}
maven-additional-options: -DskipChecks -DskipTests
maven-auto-release-after-close: true
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
types: [ published ]
workflow_dispatch: { }
jobs:
test:
name: Test release
uses: ./.github/workflows/ci.yml
secrets: inherit
deploy:
name: Deploy artifacts
uses: ./.github/workflows/deploy.yml
Expand Down

0 comments on commit 1365034

Please sign in to comment.