-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
45 lines (45 loc) · 1.66 KB
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: PowerShell script
author: Freddy Kristiansen
permissions:
contents: write
pull-requests: write
inputs:
actor:
description: The GitHub actor running the action
required: false
default: ${{ github.actor }}
token:
description: The GitHub token running the action
required: false
default: ${{ github.token }}
parentTelemetryScopeJson:
description: Specifies the parent telemetry scope for the telemetry signal
required: false
default: '7b7d'
project:
description: Project name if the repository is setup for multiple projects (* 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 (Y/N)
required: false
default: 'N'
runs:
using: composite
steps:
- name: run
shell: PowerShell
env:
_actor: ${{ inputs.actor }}
_token: ${{ inputs.token }}
_parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }}
_project: ${{ inputs.project }}
_versionnumber: ${{ inputs.versionnumber }}
_directCommit: ${{ inputs.directCommit }}
run: try { ${{ github.action_path }}/IncrementVersionNumber.ps1 -actor $ENV:_actor -token $ENV:_token -parentTelemetryScopeJson $ENV:_parentTelemetryScopeJson -project $ENV:_project -versionnumber $ENV:_versionnumber -directCommit ($ENV:_directCommit -eq 'Y') } catch { Write-Host "::Error::Unexpected error when running action ($($_.Exception.Message.Replace("`r",'').Replace("`n",' ')))"; exit 1 }
branding:
icon: terminal
color: blue