-
Notifications
You must be signed in to change notification settings - Fork 21
60 lines (60 loc) · 1.82 KB
/
install-oasis.yml
File metadata and controls
60 lines (60 loc) · 1.82 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: install-oasis
on:
workflow_call:
inputs:
release_tag:
required: false
type: string
# A push occurs to one of the matched branches.
push:
branches:
- master
- stable/*
# Or when a pull request event occurs for a pull request against one of the
# matched branches.
pull_request:
branches:
- master
- stable/*
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Install Oasis CLI (latest or pinned)
run: |
#TAG="${{ inputs.release_tag }}"
#echo "Input length: ${#TAG}"
API="https://github.com/oasisprotocol/cli/releases/download/v0.16.0/oasis_cli_0.16.0_linux_amd64.tar.gz"
echo "Fetching release"
curl -L "$API" -o oasis-cli.tar.gz
tar -xzf oasis-cli.tar.gz
rm oasis-cli.tar.gz
# Make executable
# chmod +x oasis
# Verify installation
# ./oasis --version
- name: Debug inputs
run: |
echo "Raw input: '${{ inputs.release_tag }}'"
echo "Input length: ${#TAG}"
TAG="${{ inputs.release_tag }}"
if [ -z "$TAG" ]; then
echo "TAG is empty or unset"
else
echo "TAG is set to: '$TAG'"
fi
- name: Determine release tag
id: tag
run: |
TAG="${{ inputs.release_tag }}"
if [ -z "$TAG" ]; then
echo "No input tag provided → using latest release."
TAG=$(curl -fsSL https://api.github.com/repos/oasisprotocol/cli/releases/latest | jq -r .tag_name)
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Expose PATH
run: echo "$PWD" >> "$GITHUB_PATH"
- name: Verify installation
run: |
echo "Oasis CLI installed successfully!"
oasis --version