Fix artifacts #7
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*.*.*" | |
- "testflow-v*" | |
jobs: | |
build_and_upload_artifacts: | |
name: Build and Upload Teleporter Artifacts | |
runs-on: ubuntu-20.04 | |
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 TeleporterMessenger_DeployerTransaction_${{ github.ref_name }}.txt | |
echo "tx=TeleporterMessenger_DeployerTransaction_${{ github.ref_name }}.txt" >> $GITHUB_OUTPUT | |
mv UniversalTeleporterDeployerAddress.txt TeleporterMessenger_DeployerAddress_${{ github.ref_name }}.txt | |
echo "deployer=TeleporterMessenger_DeployerAddress_${{ github.ref_name }}.txt" >> $GITHUB_OUTPUT | |
mv UniversalTeleporterMessengerContractAddress.txt TeleporterMessenger_ContractAddress_${{ github.ref_name }}.txt | |
echo "address=TeleporterMessenger_ContractAddress_${{ github.ref_name }}.txt" >> $GITHUB_OUTPUT | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ github.ref_name }} | |
tag_name: ${{ github.ref_name }} | |
prerelease: true # true for testing | |
body: ${{ steps.build_changelog.outputs.changelog }} | |
files: | | |
${{ steps.artifacts.outputs.tx }} | |
${{ steps.artifacts.outputs.deployer }} | |
${{ steps.artifacts.outputs.address }} | |