Skip to content

Commit

Permalink
Merge pull request #24 from prisma/publish-workflow
Browse files Browse the repository at this point in the history
ci: Add workflow for publishing extension
  • Loading branch information
Serhii Tatarintsev authored Oct 25, 2023
2 parents 43d28fa + ac53a39 commit e041b18
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish (latest)
run-name: Publish ${{ github.event.release.tag_name }} to latest

on:
release:
types: [published]

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

- uses: pnpm/[email protected]
with:
version: 8

- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version: 16
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Version
run: pnpm version --no-git-tag-version ${{ github.event.release.tag_name }}

- name: Publish
run: |
pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
pnpm publish --access public --tag latest --no-git-checks
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit e041b18

Please sign in to comment.