Merge pull request #282 from ava-labs/gstuart/tweak-setup-scripts #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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-20.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 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set Go version | |
run: | | |
source ./scripts/versions.sh | |
echo GO_VERSION=$GO_VERSION >> $GITHUB_ENV | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install Foundry | |
run: ./scripts/install_foundry.sh | |
- name: Build Contracts | |
run: | | |
export PATH=$PATH:$HOME/.foundry/bin | |
cd contracts/ | |
forge build | |
- name: Build changelog | |
id: build_changelog | |
uses: mikepenz/release-changelog-builder-action@v4 | |
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 contracts/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 }} | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
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 }} | |