Skip to content

Increment Version Number in [releases/24.x] #52

Increment Version Number in [releases/24.x]

Increment Version Number in [releases/24.x] #52

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: New Version Number in main branch. Use Major.Minor (optionally add .Build for versioningstrategy 3) for absolute change, or +1, +0.1 (or +0.0.1 for versioningstrategy 3) incremental change.
required: false
default: ''
skipUpdatingDependencies:
description: Skip updating dependency version numbers in all apps.
type: boolean
default: false
directCommit:
description: Direct Commit?
type: boolean
default: false
useGhTokenWorkflow:
description: Use GhTokenWorkflow for PR/Commit?
type: boolean
default: false
defaults:
run:
shell: powershell
env:
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }}
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }}
permissions:
contents: read
jobs:
IncrementVersionNumber:
needs: [ ]
runs-on: [ windows-latest ]
permissions:
actions: read
contents: write
id-token: write
pull-requests: write
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.3
with:
shell: powershell
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Initialize the workflow
id: init
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.3
with:
shell: powershell
- name: Read settings
uses: microsoft/AL-Go-Actions/ReadSettings@v7.3
with:
shell: powershell
- name: Validate Workflow Input
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: microsoft/AL-Go-Actions/ValidateWorkflowInput@v7.3
with:
shell: powershell
- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go-Actions/ReadSecrets@v7.3
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: 'TokenForPush'
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}'
- name: Increment Version Number
uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v7.3
with:
shell: powershell
token: ${{ steps.ReadSecrets.outputs.TokenForPush }}
projects: ${{ github.event.inputs.projects }}
versionNumber: ${{ github.event.inputs.versionNumber }}
skipUpdatingDependencies: ${{ github.event.inputs.skipUpdatingDependencies }}
directCommit: ${{ github.event.inputs.directCommit }}
- name: Finalize the workflow
if: always()
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
shell: powershell
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
currentJobContext: ${{ toJson(job) }}