Skip to content

Commit 979cf10

Browse files
committed
fix: gate releases on CI
Run semantic-release after CI success, install release-notes dependency, and avoid duplicate Central settings.
1 parent 6c38cdc commit 979cf10

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Release
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows: ["CI"]
56
branches: ["main"]
7+
types: [completed]
68

79
permissions:
810
contents: write
@@ -15,11 +17,13 @@ concurrency:
1517

1618
jobs:
1719
release:
20+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1821
runs-on: ubuntu-latest
1922
steps:
2023
- uses: actions/checkout@v4.2.2
2124
with:
2225
fetch-depth: 0
26+
ref: ${{ github.event.workflow_run.head_sha }}
2327
- uses: actions/setup-java@v5.1.0
2428
with:
2529
distribution: "temurin"
@@ -29,7 +33,7 @@ jobs:
2933
with:
3034
node-version-file: .tool-versions
3135
- name: Install semantic-release
32-
run: npm install --global semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/exec
36+
run: npm install --global semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/exec conventional-changelog-conventionalcommits
3337
- name: Run semantic-release
3438
env:
3539
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

gradle.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,3 @@ org.gradle.warning.mode=all
1818
# These can be overridden by environment variables
1919
signing.gnupg.executable=gpg
2020
signing.gnupg.useLegacyGpg=false
21-
22-
# Maven Central publishing (resolved via env vars in CI)
23-
mavenCentralPublishing=true
24-
mavenCentralAutomaticPublishing=true

0 commit comments

Comments
 (0)