Skip to content

fix: remove unnecessary #152

fix: remove unnecessary

fix: remove unnecessary #152

name: "contracts: test+publish"
on:
workflow_dispatch:
push:
branches-ignore:
- "master"
paths:
- "contracts/v0.1/**"
- "contracts/v0.2/**"
- "!contracts/v0.1/**/VRFCoordinator.sol"
- "!contracts/v0.1/**/VRFConsumerBase.sol"
- "!contracts/v0.1/**/vrf/**"
- "!contracts/v0.2/analysis/**"
- "!contracts/v0.2/lib/**"
- "!contracts/v0.2/script/**"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20.10.0"
registry-url: "https://registry.npmjs.org"
scope: "@bisonai"
always-auth: true
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- run: yarn contracts install
- run: yarn contracts prettier-solidity-check
- run: yarn contracts solhint
- run: yarn contracts lint
- run: yarn contracts clean && yarn contracts build
- run: yarn contracts test-non-vrf
env:
L2_PROVIDER: ${{ secrets.L2_PROVIDER }}
- name: Extract version from package.json
uses: sergeysova/jq-action@v2
id: packageJsonVersion
with:
cmd: "jq .version ./contracts/package.json -r"
- name: Extract version from the latest published package
id: npmPackageVersion
run: echo "VERSION=`npm view @bisonai/orakl-contracts version`" >> $GITHUB_OUTPUT
- name: Publish package
if: steps.packageJsonVersion.outputs.value != steps.npmPackageVersion.outputs.VERSION
run: yarn contracts publish --new-version ${{ steps.packageJsonVersion.outputs.value }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}