Add proxy v5 support #81
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
# cspell:words ncipollo | |
name: Publish | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- 'v*.*.*' | |
- develop | |
- beta | |
- release-candidate | |
- stable | |
push: | |
tags: | |
- 'custom-release-*' | |
env: | |
NODE_VERSION: 20 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install NODE JS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'yarn' | |
- name: Install project | |
run: yarn install | |
- name: Calculate version | |
id: version | |
run: | | |
export BRANCH=${GITHUB_REF##*/} | |
echo "Branch $BRANCH" | |
export VERSION=$(bash ./scripts/calculate_version.sh) | |
echo "Version $VERSION" | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
( test $BRANCH = "stable" || test $BRANCH = "master" && export PRERELEASE=false ) || export PRERELEASE=true | |
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV | |
- name: Generate ABI | |
run: yarn exec hardhat run scripts/generateAbi.ts | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: data | |
path: data | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ env.VERSION }} | |
prerelease: ${{ env.PRERELEASE }} | |
artifacts: "data/*-abi.json" | |
abi: | |
runs-on: ubuntu-latest | |
needs: | |
build | |
env: | |
VERSION: ${{ needs.build.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: abi | |
- name: Load artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: data | |
- name: Commit ABI | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "Add ABI for version ${{ env.VERSION }}" | |
add: "*-abi.json" |