Publish Package #39
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 Package | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
# prevents this action from running on forks | |
if: github.repository == 'freewheel/code-kitchen' | |
runs-on: ubuntu-latest | |
environment: Release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set node version to 17.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 17.x | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 6 | |
- name: Install deps | |
run: pnpm install | |
- name: Build code-kitchen | |
run: | | |
cd packages/code-kitchen | |
pnpm run build | |
- name: Release | |
run: pnpm semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |