-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yml
More file actions
60 lines (56 loc) · 1.67 KB
/
Copy pathaction.yml
File metadata and controls
60 lines (56 loc) · 1.67 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 }}
origin-repo:
description: 'Where to get the release artifacts'
required: false
default: 'intuit/auto'
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 ${{ inputs.origin-repo }} \
--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 --version