Skip to content

Commit e71fc8b

Browse files
authoredJan 22, 2025··
Merge pull request #1464 from arturcic/feature/prerelease
Add separate workflow for prerelease builds
2 parents 3b2eb47 + 10aa8dd commit e71fc8b

File tree

3 files changed

+49
-36
lines changed

3 files changed

+49
-36
lines changed
 

‎.github/actions/publish-azure/action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ inputs:
1717
description: 'Token for Azure DevOps'
1818
required: true
1919

20+
outputs:
21+
vsix:
22+
description: 'Path to the generated VSIX file'
23+
2024
runs:
2125
using: 'composite'
2226
steps:

‎.github/workflows/prerelease.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: prerelease
2+
on:
3+
release:
4+
types: [ prereleased ]
5+
6+
defaults:
7+
run:
8+
shell: pwsh
9+
10+
jobs:
11+
prerelease:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ ubuntu-latest ]
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
token: ${{ secrets.PUSH_GITHUB_TOKEN }}
21+
22+
- run: |
23+
npm install
24+
npm run build:tools
25+
npm run build:agent:github
26+
npm run build:agent:azure
27+
28+
name: Build code
29+
- name: Install GitVersion
30+
uses: ./gitversion/setup
31+
with:
32+
versionSpec: '6.0.x'
33+
- name: Use GitVersion
34+
id: gitversion # step id used as reference for output values
35+
uses: ./gitversion/execute
36+
- name: Publish To Azure Marketplace
37+
id: publish-azure
38+
uses: ./.github/actions/publish-azure
39+
with:
40+
mode: 'test'
41+
major: ${{ steps.gitversion.outputs.major }}
42+
minor: ${{ steps.gitversion.outputs.minor }}
43+
patch: ${{ steps.gitversion.outputs.patch }}
44+
token: ${{ secrets.TFX_TOKEN }}

‎.github/workflows/release.yml

+1-36
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,13 @@
11
name: release
22
on:
33
release:
4-
types: [ prereleased, released ]
4+
types: [ released ]
55

66
defaults:
77
run:
88
shell: pwsh
99

1010
jobs:
11-
prerelease:
12-
if: github.event.release.prerelease == true
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
os: [ ubuntu-latest ]
17-
steps:
18-
- uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 0
21-
token: ${{ secrets.PUSH_GITHUB_TOKEN }}
22-
23-
- run: |
24-
npm install
25-
npm run build:tools
26-
npm run build:agent:github
27-
npm run build:agent:azure
28-
29-
name: Build code
30-
- name: Install GitVersion
31-
uses: ./gitversion/setup
32-
with:
33-
versionSpec: '6.0.x'
34-
- name: Use GitVersion
35-
id: gitversion # step id used as reference for output values
36-
uses: ./gitversion/execute
37-
- name: Publish To Azure Marketplace
38-
id: publish-azure
39-
uses: ./.github/actions/publish-azure
40-
with:
41-
mode: 'test'
42-
major: ${{ steps.gitversion.outputs.major }}
43-
minor: ${{ steps.gitversion.outputs.minor }}
44-
patch: ${{ steps.gitversion.outputs.patch }}
45-
token: ${{ secrets.TFX_TOKEN }}
4611
release:
4712
if: github.event.release.prerelease == false
4813
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)
Please sign in to comment.