Skip to content

Commit

Permalink
ci: add npm publish (#12)
Browse files Browse the repository at this point in the history
* ci: add npm publish

* style: add line end

* fix: remove checkout depth

* fix: use npm plugin instead

* fix: add npm token

* fix: remove unnecessary tokens
  • Loading branch information
rafaelcr authored Oct 26, 2023
1 parent d6755a3 commit 7f4c40d
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,26 @@ 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

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
# 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.GITHUB_TOKEN }}
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

0 comments on commit 7f4c40d

Please sign in to comment.