Skip to content

Commit 6679aa6

Browse files
Merge pull request #114 from gjsjohnmurray/pre-CI-publish-by-branch
Revise publish CIs so only the correct one runs
2 parents 443d017 + 3c626c1 commit 6679aa6

File tree

4 files changed

+35
-8
lines changed

4 files changed

+35
-8
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ on:
1414
branches:
1515
- master
1616
release:
17-
branches:
18-
- master
1917
types:
2018
- released
2119
jobs:
@@ -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)

.github/workflows/prerelease.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ on:
1414
branches:
1515
- prerelease
1616
release:
17-
branches:
18-
- prerelease
1917
types:
2018
- released
2119
jobs:
@@ -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:

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 3.1.2022012602 (26-Jan-2022 pre-release)
1+
## 3.1.2022012603 (26-Jan-2022 pre-release)
22
* Update README.
33
* Automate pre-release publication to Marketplace.
44

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "servermanager",
33
"displayName": "InterSystems Server Manager",
4-
"version": "3.1.2022012603-SNAPSHOT",
4+
"version": "3.1.2022012603",
55
"preview": true,
66
"publisher": "intersystems-community",
77
"description": "Define connections to InterSystems servers. Browse and manage those servers.",

0 commit comments

Comments
 (0)