Skip to content

Merge pull request #8 from reservoirprotocol/relay-ethers-adapter-pac… #16

Merge pull request #8 from reservoirprotocol/relay-ethers-adapter-pac…

Merge pull request #8 from reservoirprotocol/relay-ethers-adapter-pac… #16

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Setup pnpm
run: sudo npm i -g pnpm
- name: Install Dependencies
run: pnpm install
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
- name: Get Title From Datamuse API
id: datamuse
run: |
response=$(curl -s "https://api.datamuse.com/words?ml=animal&max=1000")
length=$(echo $response | jq length)
random_index1=$(($RANDOM % length))
random_index2=$(($RANDOM % length))
while [ $random_index1 -eq $random_index2 ]; do
random_index2=$(($RANDOM % length))
done
word1=$(echo $response | jq -r ".[$random_index1].word")
word2=$(echo $response | jq -r ".[$random_index2].word")
title="$word1 $word2"
echo "Title is $title"
echo "RELEASE_TITLE=$title" >> $GITHUB_ENV
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
title: ${{ env.RELEASE_TITLE }}
publish: pnpm package:release