Skip to content

chore: testing submodule #369

chore: testing submodule

chore: testing submodule #369

name: CICD on main
on:
- pull_request
env:
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
runs-on: ubuntu-latest
if: needs.changed_files_ts.outputs.program == 'true'
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 }}