-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
39 lines (35 loc) · 1.18 KB
/
action.yml
File metadata and controls
39 lines (35 loc) · 1.18 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
name: 'Git-Semver Setup Action'
description: 'Performs setup of psanetra/git-semver for use in other GitHub workflows'
author: 'Roger Barker <pendletonroger@gmail.com>'
branding:
icon: 'check-circle'
color: 'blue'
inputs:
version:
description: 'The version of git-semver to use'
required: false
default: 'latest'
runs:
using: 'composite'
steps:
- name: Install go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: '1.24.2'
- name: Clone and build git-semver
shell: bash
run: |
if [[ "${{ inputs.version }}" == "latest" ]]; then
# clone the latest version
git clone --depth 1 https://github.com/PandasWhoCode/git-semver.git
cd git-semver
git fetch origin 4af2d24294f6fb4de5584f4f5c7cd4d29b609909 # v0.2.7
git checkout 4af2d24294f6fb4de5584f4f5c7cd4d29b609909 # v0.2.7
cd ..
else
# clone the specified version
git clone --branch ${{ inputs.version }} https://github.com/PSanetra/git-semver.git
fi
cd git-semver/cli
go build -o git-semver
sudo mv git-semver /usr/local/bin