Skip to content

Commit

Permalink
feat: improve release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
konpeki622 committed May 16, 2022
1 parent c4d8057 commit 0ad07e3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 21 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish @originjs/cli to NPM Registry

on:
push:
tags:
- 'cli@*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup .npmrc file to publish to npm
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 6

- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm lint

- name: Build
run: pnpm run build:cli

- name: Publish to NPM Registry
run: |
cd packages/cli
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
21 changes: 0 additions & 21 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 0ad07e3

Please sign in to comment.