Bump hardhat from 2.22.15 to 2.22.16 #915
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: Build and publish | |
on: | |
push: | |
branches-ignore: | |
- stable | |
- beta | |
- develop | |
pull_request: | |
types: [closed] | |
branches: | |
- stable | |
- beta | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Set up Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install project | |
run: yarn | |
- name: Determine version | |
run: | | |
export BRANCH=${GITHUB_REF##*/} | |
echo "BRANCH=$BRANCH" >> $GITHUB_ENV | |
echo "Branch $BRANCH" | |
export VERSION=$(bash ./scripts/calculate_version.sh) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "Version $VERSION" | |
( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true | |
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV | |
- name: Publish NPM package | |
run: ./scripts/publish_package.sh | |
env: | |
BRANCH: ${{ env.BRANCH }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.VERSION }} | |
release_name: ${{ env.VERSION }} | |
prerelease: ${{ env.PRERELEASE }} | |
clean: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Remove feature tag | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
export SOURCE_BRANCH=${GITHUB_HEAD_REF##*/} | |
echo "Source branch: $SOURCE_BRANCH" | |
npm dist-tag rm @skalenetwork/ima-interfaces $SOURCE_BRANCH |