Skip to content

Commit

Permalink
Merge pull request #100 from Ensono/feat/18-fix-prerelease-issue
Browse files Browse the repository at this point in the history
Feat/18 fix prerelease issue
  • Loading branch information
balpurewal authored Nov 3, 2023
2 parents fcf04d5 + 96b65ff commit 4063304
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions build/azdo/azuredevops-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pool:

# Configure parameters for running the build
parameters:
- name: force_release
displayName: Force release regardless of branch
- name: pre_release
displayName: Create a pre-release from feature branch
type: boolean
default: false

Expand Down Expand Up @@ -48,7 +48,7 @@ stages:
taskctl format
- stage: Release
condition: and(succeeded(), or(${{ eq(variables['Build.SourceBranch'], 'refs/heads/master') }}, ${{ parameters.force_release }}))
condition: and(succeeded(), or(${{ eq(variables['Build.SourceBranch'], 'refs/heads/master') }}, ${{ parameters.pre_release }}))
jobs:

- job: Publish
Expand All @@ -58,8 +58,22 @@ stages:
TaskctlVersion: ${{ variables.TaskctlVersion }}

# Publish to GitHub
- task: Bash@3
displayName: Publish Pre-Release
condition: and(succeeded(), eq(${{ parameters.pre_release }}, true))
inputs:
targetType: inline
script: |
taskctl release
env:
STAGE: "release"
PUBLISH_RELEASE: "true"
VERSION_NUMBER: $(BUILD_BUILDNUMBER)
PRERELEASE: "true"

- task: Bash@3
displayName: Publish Release
condition: and(succeeded(), eq(${{ parameters.pre_release }}, false))
inputs:
targetType: inline
script: |
Expand All @@ -68,4 +82,3 @@ stages:
STAGE: "release"
PUBLISH_RELEASE: "true"
VERSION_NUMBER: $(BUILD_BUILDNUMBER)
PRERELEASE: ${{ parameters.force_release }}

0 comments on commit 4063304

Please sign in to comment.