Publish Check #1
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: Publish | |
on: | |
workflow_run: | |
workflows: | |
- Build and Test | |
types: | |
- completed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-publish: | |
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies on root | |
run: npm ci | |
- name: Build packages | |
run: npm run build | |
- name: Configure Git User | |
run: | | |
git config --global user.name "Inferable CI" | |
git config --global user.email "[email protected]" | |
- name: Release It | |
run: | | |
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
npx release-it --npm.skipChecks | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |