File tree Expand file tree Collapse file tree 2 files changed +33
-6
lines changed Expand file tree Collapse file tree 2 files changed +33
-6
lines changed Original file line number Diff line number Diff line change 1414 branches :
1515 - master
1616 release :
17- branches :
18- - master
1917 types :
2018 - released
2119jobs :
@@ -102,10 +100,24 @@ jobs:
102100 asset_path : ${{ needs.build.outputs.name }}.vsix
103101 asset_name : ${{ needs.build.outputs.name }}.vsix
104102 asset_content_type : application/zip
105- publish :
103+ get_tagged_branch :
106104 if : github.event_name == 'release'
107105 runs-on : windows-latest
108106 needs : build
107+ outputs :
108+ taggedbranch : ${{ steps.find-branch.outputs.taggedbranch }}
109+ steps :
110+ - name : Find which branch the release tag points at
111+ id : find-branch
112+ shell : bash
113+ run : |
114+ set -x
115+ TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
116+ echo ::set-output name=taggedbranch::$TAGGEDBRANCH
117+ publish :
118+ needs : get_tagged_branch
119+ if : github.event_name == 'release' && needs.find-branch.outputs.taggedbranch == 'master'
120+ runs-on : windows-latest
109121 steps :
110122 - uses : actions/checkout@v2
111123 with :
@@ -119,6 +131,9 @@ jobs:
119131 id : set-version
120132 shell : bash
121133 run : |
134+ # REMOVE BELOW AFTER TESTING
135+ exit 1
136+ # REMOVE ABOVE AFTER TESTING
122137 VERSION=${{ needs.build.outputs.version }}
123138 NEXT_VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
124139 tmp=$(mktemp)
Original file line number Diff line number Diff line change 1414 branches :
1515 - prerelease
1616 release :
17- branches :
18- - prerelease
1917 types :
2018 - released
2119jobs :
@@ -104,10 +102,24 @@ jobs:
104102 asset_path : ${{ needs.build.outputs.name }}.vsix
105103 asset_name : ${{ needs.build.outputs.name }}.vsix
106104 asset_content_type : application/zip
107- publish :
105+ get_tagged_branch :
108106 if : github.event_name == 'release'
109107 runs-on : windows-latest
110108 needs : build
109+ outputs :
110+ taggedbranch : ${{ steps.find-branch.outputs.taggedbranch }}
111+ steps :
112+ - name : Find which branch the release tag points at
113+ id : find-branch
114+ shell : bash
115+ run : |
116+ set -x
117+ TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
118+ echo ::set-output name=taggedbranch::$TAGGEDBRANCH
119+ publish :
120+ needs : get_tagged_branch
121+ if : github.event_name == 'release' && needs.find-branch.outputs.taggedbranch == 'prerelease'
122+ runs-on : windows-latest
111123 steps :
112124 - uses : actions/checkout@v2
113125 with :
You can’t perform that action at this time.
0 commit comments