Increment Version Number in [releases/24.x] #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ' Increment Version Number' | |
run-name: "Increment Version Number in [${{ github.ref_name }}]" | |
on: | |
workflow_dispatch: | |
inputs: | |
projects: | |
description: Comma-separated list of project name patterns if the repository is setup for multiple projects (default is * for all projects) | |
required: false | |
default: '*' | |
versionNumber: | |
description: Updated Version Number. Use Major.Minor for absolute change, use +Major.Minor for incremental change. | |
required: true | |
directCommit: | |
description: Direct Commit? | |
type: boolean | |
default: false | |
useGhTokenWorkflow: | |
description: Use GhTokenWorkflow for PR/Commit? | |
type: boolean | |
default: false | |
permissions: | |
actions: read | |
contents: write | |
id-token: write | |
pull-requests: write | |
defaults: | |
run: | |
shell: powershell | |
env: | |
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} | |
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} | |
jobs: | |
IncrementVersionNumber: | |
needs: [ ] | |
runs-on: [ windows-latest ] | |
steps: | |
- name: Dump Workflow Information | |
uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@c198d5ffe9434dda2087ec2c5a9edc61e5118f28 | |
with: | |
shell: powershell | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Initialize the workflow | |
id: init | |
uses: microsoft/AL-Go/Actions/WorkflowInitialize@c198d5ffe9434dda2087ec2c5a9edc61e5118f28 | |
with: | |
shell: powershell | |
- name: Read settings | |
uses: microsoft/AL-Go/Actions/ReadSettings@c198d5ffe9434dda2087ec2c5a9edc61e5118f28 | |
with: | |
shell: powershell | |
- name: Read secrets | |
id: ReadSecrets | |
uses: microsoft/AL-Go/Actions/ReadSecrets@c198d5ffe9434dda2087ec2c5a9edc61e5118f28 | |
with: | |
shell: powershell | |
gitHubSecrets: ${{ toJson(secrets) }} | |
getSecrets: 'TokenForPush' | |
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' | |
- name: Increment Version Number | |
uses: microsoft/AL-Go/Actions/IncrementVersionNumber@c198d5ffe9434dda2087ec2c5a9edc61e5118f28 | |
with: | |
shell: powershell | |
token: ${{ steps.ReadSecrets.outputs.TokenForPush }} | |
projects: ${{ github.event.inputs.projects }} | |
versionNumber: ${{ github.event.inputs.versionNumber }} | |
directCommit: ${{ github.event.inputs.directCommit }} | |
- name: Finalize the workflow | |
if: always() | |
uses: microsoft/AL-Go/Actions/WorkflowPostProcess@c198d5ffe9434dda2087ec2c5a9edc61e5118f28 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
shell: powershell | |
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} | |
currentJobContext: ${{ toJson(job) }} |