File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Publish to pub.dev
22
33on :
4- release :
5- types : [published]
4+ workflow_run :
5+ workflows : ["Create Release"]
6+ types : [completed]
67
78jobs :
89 publish :
910 runs-on : ubuntu-latest
11+ # Only run if the triggering workflow succeeded
12+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
1013 permissions :
1114 id-token : write # Required for authentication using OIDC
1215 steps :
16+ - name : Download tag artifact
17+ uses : actions/download-artifact@v4
18+ with :
19+ name : release-tag
20+ github-token : ${{ secrets.GITHUB_TOKEN }}
21+ run-id : ${{ github.event.workflow_run.id }}
22+
23+ - name : Get tag from artifact
24+ id : get-tag
25+ run : |
26+ TAG=$(cat tag.txt)
27+ echo "tag=$TAG" >> "$GITHUB_OUTPUT"
28+ echo "🏷️ Tag from artifact: $TAG"
29+
1330 - uses : actions/checkout@v4
31+ with :
32+ ref : ${{ steps.get-tag.outputs.tag }}
1433
1534 - name : Determine package from tag
1635 id : package-info
1736 run : |
18- TAG="${{ github.ref_name }}"
37+ TAG="${{ steps.get-tag.outputs.tag }}"
1938 echo "🏷️ Processing tag: $TAG"
2039
2140 if [[ "$TAG" == mcp_dart_cli-v* ]]; then
Original file line number Diff line number Diff line change 6868 name : ${{ inputs.package }} ${{ steps.get-version.outputs.version }}
6969 generate_release_notes : true
7070 draft : false
71+
72+ - name : Save tag for publish workflow
73+ run : echo "${{ steps.create-tag.outputs.tag }}" > tag.txt
74+
75+ - name : Upload tag artifact
76+ uses : actions/upload-artifact@v4
77+ with :
78+ name : release-tag
79+ path : tag.txt
80+ retention-days : 1
You can’t perform that action at this time.
0 commit comments