Skip to content

Commit

Permalink
feat(semantic-release): added semantic-release and commitizen
Browse files Browse the repository at this point in the history
  • Loading branch information
jharrell committed Oct 30, 2024
1 parent 1c01fe6 commit 8c5eb04
Show file tree
Hide file tree
Showing 5 changed files with 9,555 additions and 2,059 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
# Pulled from https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md#githubworkflowsreleaseyml-configuration-for-node-projects
name: Release
on:
push:
branches:
- "main"
- main

permissions:
contents: read # for checkout

name: "Publish"
jobs:
publish:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
node-version: 16.x
- run: npm ci
- run: npm test
- run: npm run build
- uses: JS-DevTools/npm-publish@v1
fetch-depth: 0
- uses: actions/setup-node@v4
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
node-version: "lts/*"
- name: Install dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release -d
4 changes: 4 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

exec < /dev/tty && npx cz --hook || true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

[![Tests](https://github.com/prisma/try-prisma/actions/workflows/test.yml/badge.svg)](https://github.com/prisma/try-prisma/actions/workflows/test.yml)
[![Linting](https://github.com/prisma/try-prisma/actions/workflows/lint.yml/badge.svg)](https://github.com/prisma/try-prisma/actions/workflows/lint.yml)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

</div>

Expand Down
Loading

0 comments on commit 8c5eb04

Please sign in to comment.