-
Notifications
You must be signed in to change notification settings - Fork 25
74 lines (70 loc) · 4.09 KB
/
release.yaml
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
name: Update and tag release version
on:
workflow_dispatch:
inputs:
binary-to-release:
description: Binary to release
type: choice
options:
- ampd
- router
- gateway
- multisig
- multisig-prover
- rewards
- service-registry
- voting-verifier
- coordinator
- axelarnet-gateway
- interchain-token-service
dry-run:
description: Dry run
type: boolean
default: true
jobs:
release:
name: Release ${{ github.event.inputs.binary-to-release }}
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.INTEROP_CI_ACTION_TOKEN }}
- name: Setup variables for sub-project to release
id: setup-variables
shell: bash
run: |
binary="${{ github.event.inputs.binary-to-release }}"
declare -A binaries_data=(
["ampd"]="ampd,/\(major\)|\(major-ampd\)/,/\(minor\)|\(minor-ampd\)/,ampd packages"
["router"]="router,/\(major\)|\(major-router\)|\(major-contracts\)|\(major-connection-router\)/,/\(minor\)|\(minor-router\)|\(minor-contracts\)|\(minor-connection-router\)/,contracts/router packages"
["gateway"]="gateway,/\(major\)|\(major-gateway\)|\(major-contracts\)/,/\(minor\)|\(minor-gateway\)|\(minor-contracts\)/,contracts/gateway packages"
["multisig"]="multisig,/\(major\)|\(major-multisig\)|\(major-contracts\)/,/\(minor\)|\(minor-multisig\)|\(minor-contracts\)/,contracts/multisig packages"
["multisig-prover"]="multisig-prover,/\(major\)|\(major-multisig-prover\)|\(major-contracts\)/,/\(minor\)|\(minor-multisig-prover\)|\(minor-contracts\)/,contracts/multisig-prover packages"
["rewards"]="rewards,/\(major\)|\(major-rewards\)|\(major-contracts\)/,/\(minor\)|\(minor-rewards\)|\(minor-contracts\)/,contracts/rewards packages"
["service-registry"]="service-registry,/\(major\)|\(major-service-registry\)|\(major-contracts\)/,/\(minor\)|\(minor-service-registry\)|\(minor-contracts\)/,contracts/service-registry packages"
["voting-verifier"]="voting-verifier,/\(major\)|\(major-voting-verifier\)|\(major-contracts\)/,/\(minor\)|\(minor-voting-verifier\)|\(minor-contracts\)/,contracts/voting-verifier packages"
["coordinator"]="coordinator,/\(major\)|\(major-coordinator\)|\(major-contracts\)/,/\(minor\)|\(minor-coordinator\)|\(minor-contracts\)/,contracts/coordinator packages"
["axelarnet-gateway"]="axelarnet-gateway,/\(major\)|\(major-axelarnet-gateway\)|\(major-contracts\)/,/\(minor\)|\(minor-axelarnet-gateway\)|\(minor-contracts\)/,contracts/axelarnet-gateway packages"
["interchain-token-service"]="interchain-token-service,/\(major\)|\(major-interchain-token-service\)|\(major-contracts\)/,/\(minor\)|\(minor-interchain-token-service\)|\(minor-contracts\)/,contracts/interchain-token-service packages"
)
if [[ -n "${binaries_data[$binary]}" ]]; then
IFS=',' read -r binary_to_release major_pattern minor_pattern change_path <<< "${binaries_data[$binary]}"
echo "binary-to-release=$binary_to_release" >> "$GITHUB_OUTPUT"
echo "major-pattern=$major_pattern" >> "$GITHUB_OUTPUT"
echo "minor-pattern=$minor_pattern" >> "$GITHUB_OUTPUT"
echo "change-path=$change_path" >> "$GITHUB_OUTPUT"
else
echo "Unknown binary to release"
exit 1
fi
- name: Release ${{ github.event.inputs.binary-to-release }}
uses: ./.github/actions/release
with:
binary-to-release: ${{ steps.setup-variables.outputs.binary-to-release }}
dry-run: ${{ github.event.inputs.dry-run }}
major-pattern: ${{ steps.setup-variables.outputs.major-pattern }}
minor-pattern: ${{ steps.setup-variables.outputs.minor-pattern }}
change-path: ${{ steps.setup-variables.outputs.change-path }}
github_token: ${{ secrets.INTEROP_CI_ACTION_TOKEN }}