-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
38 lines (32 loc) · 1.05 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
name: 'setup-xbuild-action'
description: 'Installs xbuild from github releases.'
inputs:
github_token:
description: "The secrets.GITHUB_TOKEN is required for the github cli to work"
required: true
runs:
using: composite
steps:
- run: sudo mkdir -p /opt/xbuild/bin
shell: bash
- run: sudo chown $(whoami) /opt/xbuild/bin
shell: bash
- run: gh release download -p xbuild-linux-x64 -R rust-mobile/xbuild -O /opt/xbuild/bin/x
if: runner.os == 'Linux'
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
- run: gh release download -p xbuild-macos-x64 -R rust-mobile/xbuild -O /opt/xbuild/bin/x
if: runner.os == 'macOS'
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
- run: gh release download -p xbuild-windows-x64.exe -R rust-mobile/xbuild -O /opt/xbuild/bin/x.exe
if: runner.os == 'Windows'
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
- run: chmod +x /opt/xbuild/bin/x
shell: bash
- run: echo "/opt/xbuild/bin" >> $GITHUB_PATH
shell: bash