build(i18nify): update version (#180) #45
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: i18nify Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
paths: | |
- 'packages/i18nify-js/**' | |
- 'packages/i18nify-react/**' | |
- 'i18nify-data/**' | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.CI_BOT_TOKEN }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest # nosemgrep: non-self-hosted-runner | |
steps: | |
- name: Checkout Codebase | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node v20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.3.1 | |
- name: Install dependencies | |
run: yarn | |
- name: Build core package | |
run: yarn build-js | |
- name: Create Release Pull Request & Publish packages | |
id: changesets | |
uses: changesets/action@v1 | |
if: github.event_name != 'workflow_dispatch' # only run on master merges | |
env: | |
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} | |
with: | |
publish: yarn release | |
commit: 'build(i18nify): update version' | |
title: 'build(i18nify): update version' | |
- name: Publish to public npm registry | |
if: steps.changesets.outputs.published == 'true' || github.event_name == 'workflow_dispatch' # run when the package is published via changeset or if a release is triggered manually. | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
run: yarn publish-npm |