-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
57 lines (53 loc) · 1.55 KB
/
action.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
name: 'Setup Auto'
description: 'GitHub Action to install Auto release tool'
author: 'Alexey Alekhin'
branding:
icon: at-sign
color: yellow
inputs:
version:
description: 'Version of Auto to install (latest by default)'
required: false
git-user:
description: 'Git user name to set for Auto'
required: false
default: 'github-actions[bot]'
git-email:
description: 'Git email to set for Auto'
required: false
default: '41898282+github-actions[bot]@users.noreply.github.com'
gh-token:
description: 'GH_TOKEN for Auto'
required: false
default: ${{ github.token }}
runs:
using: composite
steps:
- name: Set up GitHub credentials for Auto
shell: bash
run: |
echo "GH_TOKEN=${{ inputs.gh-token }}" >> $GITHUB_ENV
git config user.name "${{ inputs.git-user }}"
git config user.email "${{ inputs.git-email }}"
- name: Install Auto binary
shell: bash
run: |
platform='linux'
[ '${{ runner.os }}' == 'macOS' ] && platform='macos'
[ '${{ runner.os }}' == 'Windows' ] && platform='win.exe'
name="auto-${platform}"
tmp="${{ runner.temp }}"
gh release \
download ${{ inputs.version }} \
--repo intuit/auto \
--pattern "$name.gz" \
--dir "$tmp"
gunzip "$tmp/$name.gz"
chmod +x "$tmp/$name"
mkdir "$HOME/bin"
mv "$tmp/$name" "$HOME/bin/auto"
echo "$HOME/bin" >> $GITHUB_PATH
- name: Check Auto installation
shell: bash
run: |
auto --help