Skip to content

Release @novemberfiveco/skidder-typescript #8

Release @novemberfiveco/skidder-typescript

Release @novemberfiveco/skidder-typescript #8

Workflow file for this run

name: Release @novemberfiveco/skidder-react
concurrency:
group: publish-${{ github.github.base_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
type:
type: choice
description: 'Choose the release type'
options:
- patch
- minor
- major
required: true
default: patch
dry:
type: boolean
description: Dry run release
default: false
jobs:
publish:
if: github.repository == 'novemberfiveco/skidder-react' && github.ref == 'refs/heads/master'
name: 'Publish'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
token: ${{ secrets.GH_PUSH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: '18.15.0'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- name: Git Config
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: NPM Credentials
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Release
run: npm run release -- --ci -V --increment $TYPE_ARG $DRY_ARG
env:
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
TYPE_ARG: ${{ inputs.type }}
DRY_ARG: ${{ inputs.dry == true && '--dry-run' || '' }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}