bump contracts #101
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
name: Publish Solidity Package | |
on: | |
push: | |
branches: | |
- master | |
- solc-0.6 | |
- solc-0.7 | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- run: | | |
echo npmAuthToken: "\${NPM_AUTH_TOKEN}" >> ./.yarnrc.yml | |
- name: Publish Solidity Package | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
set -x | |
# install dependencies | |
yarn | |
# compile | |
yarn run generate-bytecode | |
version=$(cat contracts/package.json| jq .version) | |
if [ $(yarn npm info '@acala-network/contracts' --json | jq -er ".versions|any(. == $version)") == false ] | |
then | |
# prepare | |
yarn workspace '@acala-network/contracts' prepare | |
# publish | |
yarn tsc -p tsconfig-cjs.json && yarn workspace '@acala-network/contracts' npm publish --access=public | |
fi | |
- run: | | |
git checkout ./.yarnrc.yml |