Skip to content

Commit 7e1b541

Browse files
authored
Merge pull request #964 from microsoftgraph/fix/compare-package
Fetch latest release tag as branch name for comparison
2 parents dc4a509 + 25c9d0d commit 7e1b541

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/gradle-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches: [main, support/5.x.x]
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215
runs-on: ubuntu-latest
@@ -67,12 +70,16 @@ jobs:
6770
with:
6871
name: drop
6972
path: artifacts/current/
73+
- name: Get latest release tag
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
run: echo "BRANCH=$(gh release list -L 1 --json tagName --jq '.[0] | .tagName')" >> $GITHUB_ENV
7077
- name: Download Last Successful Build
7178
uses: dawidd6/action-download-artifact@v3.1.4
7279
with:
7380
workflow: preview-and-release.yml
7481
workflow_conclusion: success
75-
branch: dev
82+
branch: ${{ env.BRANCH }}
7683
event: push
7784
name: drop
7885
path: artifacts/previous/

0 commit comments

Comments
 (0)