Skip to content

Commit

Permalink
Add release pipeline to publish to npm and rename to @kontent-ai scop…
Browse files Browse the repository at this point in the history
…ed package
  • Loading branch information
JiriLojda authored Jun 9, 2023
1 parent a767e2b commit 373f205
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
release:
types: [published]

name: publish-to-npm
jobs:
publish:
runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Extract version from tag
id: get_version
uses: battila7/get-version-action@v2
- run: npm --no-git-tag-version version ${{ steps.get_version.outputs.version-without-v }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Adjust release version to ${{ steps.get_version.outputs.version-without-v }}
branch: ${{ github.event.repository.default_branch }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "eslint-config-kontent-ai",
"name": "@kontent-ai/eslint-config",
"version": "0.1.8",
"description": "Eslint configuration used for packages in Kontent.ai",
"main": "index.js",
Expand Down

0 comments on commit 373f205

Please sign in to comment.