Skip to content

Commit

Permalink
Merge pull request #1464 from arturcic/feature/prerelease
Browse files Browse the repository at this point in the history
Add separate workflow for prerelease builds
  • Loading branch information
arturcic authored Jan 22, 2025
2 parents 3b2eb47 + 10aa8dd commit e71fc8b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 36 deletions.
4 changes: 4 additions & 0 deletions .github/actions/publish-azure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
description: 'Token for Azure DevOps'
required: true

outputs:
vsix:
description: 'Path to the generated VSIX file'

runs:
using: 'composite'
steps:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: prerelease
on:
release:
types: [ prereleased ]

defaults:
run:
shell: pwsh

jobs:
prerelease:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PUSH_GITHUB_TOKEN }}

- run: |
npm install
npm run build:tools
npm run build:agent:github
npm run build:agent:azure
name: Build code
- name: Install GitVersion
uses: ./gitversion/setup
with:
versionSpec: '6.0.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: ./gitversion/execute
- name: Publish To Azure Marketplace
id: publish-azure
uses: ./.github/actions/publish-azure
with:
mode: 'test'
major: ${{ steps.gitversion.outputs.major }}
minor: ${{ steps.gitversion.outputs.minor }}
patch: ${{ steps.gitversion.outputs.patch }}
token: ${{ secrets.TFX_TOKEN }}
37 changes: 1 addition & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,13 @@
name: release
on:
release:
types: [ prereleased, released ]
types: [ released ]

defaults:
run:
shell: pwsh

jobs:
prerelease:
if: github.event.release.prerelease == true
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PUSH_GITHUB_TOKEN }}

- run: |
npm install
npm run build:tools
npm run build:agent:github
npm run build:agent:azure
name: Build code
- name: Install GitVersion
uses: ./gitversion/setup
with:
versionSpec: '6.0.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: ./gitversion/execute
- name: Publish To Azure Marketplace
id: publish-azure
uses: ./.github/actions/publish-azure
with:
mode: 'test'
major: ${{ steps.gitversion.outputs.major }}
minor: ${{ steps.gitversion.outputs.minor }}
patch: ${{ steps.gitversion.outputs.patch }}
token: ${{ secrets.TFX_TOKEN }}
release:
if: github.event.release.prerelease == false
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit e71fc8b

Please sign in to comment.