Skip to content

chore(release): dialtone-icons/v4.1.1 #24

chore(release): dialtone-icons/v4.1.1

chore(release): dialtone-icons/v4.1.1 #24

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches:
- production
- alpha
- beta
- next
env:
HUSKY: 0
jobs:
release:
concurrency: ${{ github.workflow }}-${{ github.ref }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18 ]
defaults:
run:
working-directory: ${{ github.workspace }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: parse branch from ref
id: branch
run: echo ::set-output name=BRANCH::${GITHUB_REF/refs\/heads\//}
# Will prevent the rest of the steps from running on fail
- name: Check if user is a dialpad member
uses: octokit/request-action@v2.1.0
with:
route: GET /orgs/dialpad/members/${{ github.actor }}
env:
GITHUB_TOKEN: ${{ secrets.DIALTONE_CI_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Set npm token
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.DIALTONE_NPM_TOKEN }}
# note that npm run build is executed before publishing via prepublishOnly
- name: Deploy production
if: ${{ github.ref == 'refs/heads/production' }}
run: npx nx run-many --target=release
- name: Deploy prerelease
if: ${{ github.ref != 'refs/heads/production' }}
run: npx nx run-many --target=release --args="--tag ${{ steps.branch.outputs.BRANCH }}"
- name: Set registry to github packages
run: npm config set @dialpad:registry https://npm.pkg.github.com
- name: Set github auth token
run: npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
# note that npm run build is executed before publishing via prepublishOnly
- name: Deploy production to github packages
if: ${{ github.ref == 'refs/heads/production' }}
run: npx nx run-many --target=release
- name: Deploy ${{ steps.branch.outputs.BRANCH }} to github packages
if: ${{ github.ref != 'refs/heads/production' }}
run: npx nx run-many --target=release --args="--tag ${{ steps.branch.outputs.BRANCH }}"
- name: Github Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx nx run-many --target=release-github