Fix/pool constant public key #317
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: CICD on main | |
on: | |
pull_request: | |
push: | |
paths-ignore: | |
- "docs/**" | |
- "README.md" | |
- "LICENSE" | |
- ".editorconfig" | |
branches: | |
- master | |
env: | |
WALLET_PRIVATE_KEY: ${{secrets.WALLET_PRIVATE_KEY}} | |
MAINNET_RPC_ENDPOINT: ${{secrets.MAINNET_RPC_ENDPOINT}} | |
working_dir: ./ts-client | |
jobs: | |
changed_files_ts: | |
runs-on: ubuntu-latest | |
outputs: | |
program: ${{steps.changed-files-specific.outputs.any_changed}} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Get specific changed files | |
id: changed-files-specific | |
uses: tj-actions/[email protected] | |
with: | |
files: | | |
ts-client | |
ts-test-publish: | |
needs: changed_files_ts | |
if: needs.changed_files_ts.outputs.program == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .npmrc file to publish to npm | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "16.x" | |
registry-url: "https://registry.npmjs.org" | |
- uses: pnpm/[email protected] | |
with: | |
version: 6.0.2 | |
- name: Install modules | |
working-directory: ${{ env.working_dir }} | |
run: pnpm i | |
- name: Build | |
working-directory: ${{ env.working_dir }} | |
run: pnpm run build | |
- name: Add git commit tag to env | |
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV | |
- name: Publish to npm | |
working-directory: ${{ env.working_dir }} | |
run: | | |
npm version --no-git-tag-version prerelease --preid=${SHORT_SHA} --force | |
npm publish --tag next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |