-
Notifications
You must be signed in to change notification settings - Fork 38
96 lines (84 loc) · 2.9 KB
/
promote.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Promote fluence-cli
on:
workflow_dispatch:
inputs:
channel:
description: "Promote version to channel"
type: choice
options:
- main # latest build from main branch
- stage # version compatible with current stage env
- testnet # version compatible with current testnet env
- stable # latest stable version (same as mainnet)
- mainnet # version compatible with current mainnet env
- v1 # version compatible with mainnet marketplace v1 (old CLI)
- v2 # version compatible with mainnet marketplace v2 (current)
- unstable # version used by all CI jobs; TODO: publish automatically on every release
required: true
ref:
description: "git ref to checkout into"
type: string
required: true
default: "main"
env:
CI: true
FORCE_COLOR: true
AWS_REGION: "eu-west-1"
AWS_S3_FORCE_PATH_STYLE: true
jobs:
pack:
strategy:
fail-fast: false
matrix:
platform:
- linux-x64
- darwin-x64
- darwin-arm64
- win32-x64
uses: ./.github/workflows/pack.yml
with:
ref: ${{ inputs.ref }}
platform: ${{ matrix.platform }}
upload-to-s3: true
channel: ${{ inputs.channel }}
promote:
name: "Promote fcli"
needs: pack
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout fluence-cli
uses: actions/checkout@v4
with:
repository: fluencelabs/cli
ref: ${{ inputs.ref }}
- name: Import secrets
uses: hashicorp/[email protected]
id: secrets
with:
url: https://vault.fluence.dev
path: jwt/github
role: ci
method: jwt
jwtGithubAudience: "https://github.com/fluencelabs"
jwtTtl: 300
exportToken: false
secrets: |
kv/ci/fcli-binaries id | AWS_ACCESS_KEY_ID ;
kv/ci/fcli-binaries secret | AWS_SECRET_ACCESS_KEY
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "22.10.0"
registry-url: "https://npm.fluence.dev"
cache: "yarn"
- run: yarn install
working-directory: packages/cli/package
- name: Promote fluence-cli
working-directory: packages/cli/package
run: yarn oclif promote -t linux-x64,darwin-x64,darwin-arm64 --version "$(jq .[] -r ../../../.github/release-please/manifest.json)" --sha "$(git rev-parse --short HEAD)" --channel ${{ inputs.channel }} --no-xz --indexes
- name: Promote fluence-cli windows
working-directory: packages/cli/package
run: yarn oclif promote -t win32-x64 --version "$(jq .[] -r ../../../.github/release-please/manifest.json)" --sha "$(git rev-parse --short HEAD)" --channel ${{ inputs.channel }} --no-xz --win --indexes