Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add npm publish #12

Merged
merged 6 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,30 @@ jobs:
- name: Teardown integration environment
run: npm run testenv:stop
if: always()

build-publish:
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
rafaelcr marked this conversation as resolved.
Show resolved Hide resolved
persist-credentials: false

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
# Only run on non-PR events or only PRs that aren't from forks
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
rafaelcr marked this conversation as resolved.
Show resolved Hide resolved
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
SEMANTIC_RELEASE_PACKAGE: ${{ github.event.repository.name }}
with:
semantic_version: 19
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
[email protected]
23 changes: 23 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"branches": [
"master"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/changelog",
"@semantic-release/git"
]
}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# API Toolkit

/ / ▶ API Toolkit
/ --- / A comprehensive collection of tools designed by Hiro to simplify common tasks in
/ / API development.

[![NPM Package](https://img.shields.io/npm/v/@hirosystems/api-toolkit.svg?style=flat-square)](https://www.npmjs.org/package/@hirosystems/api-toolkit)

The API Toolkit Library is a comprehensive collection of tools designed by Hiro to simplify common
tasks in API development. This library provides functionalities for database management, application
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
},
"homepage": "https://github.com/hirosystems/api-toolkit#readme",
"prettier": "@stacks/prettier-config",
"engines": {
"node": ">=18"
},
"devDependencies": {
"@commitlint/cli": "^17.5.0",
"@commitlint/config-conventional": "^17.4.4",
Expand Down
Loading