forked from ava-labs/icm-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (61 loc) · 2.58 KB
/
release.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
# Copyright (C) 2023, Ava Labs, Inc. All rights reserved.
# See the file LICENSE for licensing terms.
name: Release Teleporter
on:
push:
tags:
- "v*.*.0"
jobs:
build_and_upload_artifacts:
name: Build and Upload Teleporter Artifacts
runs-on: ubuntu-22.04
env:
deployment_tx_fn: TeleporterMessenger_Deployment_Transaction_${{ github.ref_name }}.txt
deployer_addr_fn: TeleporterMessenger_Deployer_Address_${{ github.ref_name }}.txt
contract_addr_fn: TeleporterMessenger_Contract_Address_${{ github.ref_name }}.txt
teleporter_messenger_bytecode_fn: TeleporterMessenger_Bytecode_${{ github.ref_name }}.txt
teleporter_registry_bytecode_fn: TeleporterRegistry_Bytecode_${{ github.ref_name }}.txt
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install Foundry
run: ./scripts/install_foundry.sh
- name: Build Contracts
run: |
export PATH=$PATH:$HOME/.foundry/bin
forge build --force --extra-output-files bin
- name: Build changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
failOnError: true
configuration: "./.github/changelog.json"
toTag: ${{ github.ref_name }}
- name: Create Artifacts
id: artifacts
run: |
go run utils/contract-deployment/contractDeploymentTools.go constructKeylessTx out/TeleporterMessenger.sol/TeleporterMessenger.json
mv UniversalTeleporterDeployerTransaction.txt ${{ env.deployment_tx_fn }}
mv UniversalTeleporterDeployerAddress.txt ${{ env.deployer_addr_fn }}
mv UniversalTeleporterMessengerContractAddress.txt ${{ env.contract_addr_fn }}
mv out/TeleporterMessenger.sol/TeleporterMessenger.bin ${{ env.teleporter_messenger_bytecode_fn }}
mv out/TeleporterRegistry.sol/TeleporterRegistry.bin ${{ env.teleporter_registry_bytecode_fn }}
- name: Create release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
prerelease: false
body: ${{ steps.build_changelog.outputs.changelog }}
files: |
${{ env.deployment_tx_fn }}
${{ env.deployer_addr_fn }}
${{ env.contract_addr_fn }}
${{ env.teleporter_messenger_bytecode_fn }}
${{ env.teleporter_registry_bytecode_fn}}