Merge pull request #568 from samternent/changeset-release/main #10
Workflow file for this run
This file contains hidden or 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: Production Tag Deployment | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| PNPM_CACHE_PATH: ~/.pnpm-store | |
| PNPM_CACHE_NAME: pnpm-store-cache | |
| on: | |
| push: | |
| tags: | |
| - "@ternent/concord-*.*.*" | |
| jobs: | |
| Deploy-Production: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Checkout repo | |
| uses: actions/checkout@master | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Get branch name | |
| id: branch | |
| run: | | |
| echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | |
| - name: Get node version | |
| id: nvmrc | |
| run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| - name: Setup Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| always-auth: true | |
| node-version-file: ".nvmrc" | |
| registry-url: https://registry.npmjs.org | |
| cache: "pnpm" | |
| - name: Set publishing config | |
| run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" | |
| env: | |
| NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build dependencies | |
| run: pnpm --filter ternent-utils --filter ternent-ui --filter @ternent/identity --filter @ternent/rage --filter @ternent/armour --filter @ternent/seal-cli --filter @ternent/concord-protocol --filter @ternent/ledger build | |
| - name: Test @ternent/concord | |
| run: pnpm --filter @ternent/concord test | |
| - name: Build @ternent/concord | |
| run: pnpm --filter @ternent/concord build | |
| - name: Publish npm | |
| run: pnpm --filter @ternent/concord publish --no-git-checks --access public | |
| env: | |
| NPM_TOKEN: ${{ env.NPM_TOKEN }} |