Skip to content

Commit 24b733f

Browse files
authored
Merge pull request #1649 from microsoftgraph/fix/release-workflows
Fix/release workflows
2 parents 6bde2f7 + bb1e228 commit 24b733f

File tree

2 files changed

+11
-33
lines changed

2 files changed

+11
-33
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ env:
1515
PREVIEW_TASK: publishSnapshotPublicationToSonatypeSnapshotRepository
1616
PUBLISH_TASK: publishMavenCentralReleasePublicationToSonatypeRepository
1717

18+
permissions:
19+
contents: write
20+
1821
jobs:
1922
maven_Preview:
2023
if: ${{ github.ref == 'refs/heads/main' }}
@@ -49,7 +52,7 @@ jobs:
4952
run: ./gradlew $PREVIEW_TASK
5053

5154
maven_Release:
52-
if: startsWith(github.ref, 'refs/tags/')
55+
if: ${{ startsWith(github.ref, 'refs/tags/') && github.actor == 'release-please[bot]'}}
5356
environment:
5457
name: maven_central_release
5558
runs-on: ubuntu-latest
@@ -94,4 +97,11 @@ jobs:
9497
gradle.properties
9598
**/gradle/**
9699
Scripts/**
100+
- name: Github Release
101+
uses: softprops/action-gh-release@v2
102+
with:
103+
token: ${{ secrets.GITHUB_TOKEN }}
104+
fail_on_unmatched_files: true
105+
files: |
106+
build/**/*.jar
97107

.github/workflows/git-release.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)