-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yaml
More file actions
43 lines (38 loc) · 1.29 KB
/
action.yaml
File metadata and controls
43 lines (38 loc) · 1.29 KB
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
name: "Version Pack"
description: "Generates a version number from github.ref.version-pack"
author: "Nivaes"
inputs:
branch:
description: "Branch"
required: false
outputs:
version-number:
description: "Version number"
value: ${{ steps.run.outputs.version-number }}
version-pack:
description: "Version pack"
value: ${{ steps.run.outputs.version-pack }}
version-release:
description: "Version release"
value: ${{ steps.run.outputs.version-release }}
runs:
using: "composite"
steps:
- name: Instalar dotnet-script
shell: bash
run: dotnet tool install -g dotnet-script
- name: New version
id: run
shell: bash
run: |
output=$(~/.dotnet/tools/dotnet-script $GITHUB_ACTION_PATH/src/Run.csx brach=${{ inputs.branch }})
version_number=$(echo "$output" | tail -n 3 | sed -n '1p')
version_pack=$(echo "$output" | tail -n 3 | sed -n '2p')
version_release=$(echo "$output" | tail -n 3 | sed -n '3p')
echo number: $version_number pack: $version_pack release: $version_release
echo "version-number=$version_number" >> $GITHUB_OUTPUT
echo "version-pack=$version_pack" >> $GITHUB_OUTPUT
echo "version-release=$version_release" >> $GITHUB_OUTPUT
branding:
icon: "tag"
color: "gray-dark"