Skip to content

Increment Version Number in [main] #5

Increment Version Number in [main]

Increment Version Number in [main] #5

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:
contents: write
pull-requests: write
defaults:
run:
shell: pwsh
env:
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }}
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }}
jobs:
IncrementVersionNumber:
needs: [ ]
runs-on: [ ubuntu-latest ]
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@e9f4cc63d149d341172cebfc8112e825123683d8
with:
shell: pwsh
- name: Checkout
uses: actions/checkout@v4
- name: Initialize the workflow
id: init
uses: microsoft/AL-Go/Actions/WorkflowInitialize@e9f4cc63d149d341172cebfc8112e825123683d8
with:
shell: pwsh
eventId: "DO0096"
- name: Read settings
uses: microsoft/AL-Go/Actions/ReadSettings@e9f4cc63d149d341172cebfc8112e825123683d8
with:
shell: pwsh
- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go/Actions/ReadSecrets@e9f4cc63d149d341172cebfc8112e825123683d8
with:
shell: pwsh
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: 'TokenForPush'
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}'
- name: Increment Version Number
uses: microsoft/AL-Go/Actions/IncrementVersionNumber@e9f4cc63d149d341172cebfc8112e825123683d8
with:
shell: pwsh
token: ${{ steps.ReadSecrets.outputs.TokenForPush }}
parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
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@e9f4cc63d149d341172cebfc8112e825123683d8
with:
shell: pwsh
eventId: "DO0096"
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}