Skip to content

Commit

Permalink
Merge pull request #115 from gjsjohnmurray/pre-CI-publish-by-branch2
Browse files Browse the repository at this point in the history
Another attempt at the release CI fix
  • Loading branch information
gjsjohnmurray authored Jan 27, 2022
2 parents 6679aa6 + 74aee09 commit 1a86972
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 32 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,18 @@ jobs:
outputs:
name: ${{ steps.set-version.outputs.name }}
version: ${{ steps.set-version.outputs.version }}
taggedbranch: ${{ steps.find-branch.outputs.taggedbranch }}
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Find which branch the release tag points at
id: find-branch
if: github.event_name == 'release' && runner.os == 'Windows'
shell: bash
run: |
set -x
TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
echo ::set-output name=taggedbranch::$TAGGEDBRANCH
- name: Set an output
id: set-version
if: runner.os == 'Windows'
Expand Down Expand Up @@ -100,22 +109,8 @@ jobs:
asset_path: ${{ needs.build.outputs.name }}.vsix
asset_name: ${{ needs.build.outputs.name }}.vsix
asset_content_type: application/zip
get_tagged_branch:
if: github.event_name == 'release'
runs-on: windows-latest
needs: build
outputs:
taggedbranch: ${{ steps.find-branch.outputs.taggedbranch }}
steps:
- name: Find which branch the release tag points at
id: find-branch
shell: bash
run: |
set -x
TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
echo ::set-output name=taggedbranch::$TAGGEDBRANCH
publish:
needs: get_tagged_branch
needs: build
if: github.event_name == 'release' && needs.find-branch.outputs.taggedbranch == 'master'
runs-on: windows-latest
steps:
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,18 @@ jobs:
outputs:
name: ${{ steps.set-version.outputs.name }}
version: ${{ steps.set-version.outputs.version }}
taggedbranch: ${{ steps.find-branch.outputs.taggedbranch }}
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Find which branch the release tag points at
id: find-branch
if: github.event_name == 'release' && runner.os == 'Windows'
shell: bash
run: |
set -x
TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
echo ::set-output name=taggedbranch::$TAGGEDBRANCH
- name: Set an output
id: set-version
if: runner.os == 'Windows'
Expand Down Expand Up @@ -102,22 +111,8 @@ jobs:
asset_path: ${{ needs.build.outputs.name }}.vsix
asset_name: ${{ needs.build.outputs.name }}.vsix
asset_content_type: application/zip
get_tagged_branch:
if: github.event_name == 'release'
runs-on: windows-latest
needs: build
outputs:
taggedbranch: ${{ steps.find-branch.outputs.taggedbranch }}
steps:
- name: Find which branch the release tag points at
id: find-branch
shell: bash
run: |
set -x
TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
echo ::set-output name=taggedbranch::$TAGGEDBRANCH
publish:
needs: get_tagged_branch
needs: build
if: github.event_name == 'release' && needs.find-branch.outputs.taggedbranch == 'prerelease'
runs-on: windows-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 3.1.2022012603 (26-Jan-2022 pre-release)
## 3.1.2022012604 (26-Jan-2022 pre-release)
* Update README.
* Automate pre-release publication to Marketplace.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "servermanager",
"displayName": "InterSystems Server Manager",
"version": "3.1.2022012603",
"version": "3.1.2022012604",
"preview": true,
"publisher": "intersystems-community",
"description": "Define connections to InterSystems servers. Browse and manage those servers.",
Expand Down

0 comments on commit 1a86972

Please sign in to comment.