gitmoji/.github/workflows/npm-publish.yml
Carlos Cuesta 8fd367f259
Export gitmojis as CJS and ESM (#1280)
*  Install `unbuild` dependency
* 🚚 Rename `gitmojis.d.ts` to `index.d.ts`
*  Export `cjs` and `esm` with `unbuild`
* 👷 Add `build` step to publish action
* 🔧 Add `gitmojis` build output to turborepo config
* 🔧 Add `build` as a dependency for `lint`, `tscheck` and `build`
*  Add `assert { type: json }` for JSON imports
* 🧑‍💻 Watch changes on `gitmojis` to rebuild deps for website (#1282)

Co-authored-by: Vinícius Hoyer <contact@vhoyer.dev>
2023-01-18 19:33:43 +01:00

30 lines
836 B
YAML

name: NPM Publish
on:
push:
tags:
- "v*"
jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: "16"
- name: Install dependencies 📦
run: yarn install --immutable
- name: Build 👷‍♂️
run: yarn turbo run build --filter=gitmojis
- name: Publish package to NPM 🚀
env:
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
run: |
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
yarn turbo publishPackage
- name: Publish GitHub Release 📝
uses: softprops/action-gh-release@v1
with:
name: gitmoji ${{github.ref_name}}
generate_release_notes: true