Skip to content

Commit

Permalink
chore: Publish package using gha
Browse files Browse the repository at this point in the history
  • Loading branch information
manferlo81 committed Nov 11, 2024
1 parent 66bcc7b commit 64099ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
29 changes: 0 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@ commands:
- attach_workspace:
at: ~/map-number

command_publish_to_npm:
steps:
- run:
name: Login to npm
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- run:
name: Publish to npm
command: npm publish

jobs:
job_lint:
description: Lint Code
Expand Down Expand Up @@ -111,13 +102,6 @@ jobs:
- command_checkout_cache_install
- command_test_and_build

job_publish_to_npm:
description: Publish package to npm
executor: executor_node_20
steps:
- command_restore_workspace
- command_publish_to_npm

workflows:
workflow_ci:
jobs:
Expand Down Expand Up @@ -163,16 +147,3 @@ workflows:
only: /.*/
branches:
only: /.*/

- job_publish_to_npm:
context: npm
requires:
- job_node_18_test_and_build
- job_node_20_test_and_build
- job_node_21_test_and_build
- job_node_22_test_and_build
filters:
tags:
only: /^v\d+\.\d+\.\d+$/
branches:
ignore: /.*/
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,19 @@ jobs:
needs: job_lint_test_build

steps:
- run: echo "not implemented yet..."
- name: Checkout, Setup Node.js v${{ env.NODE_VERSION }} and Install dependencies
uses: manferlo81/action-checkout-node-install@v0
with:
node-version: ${{ env.NODE_VERSION }}
env:
NODE_VERSION: 20.x

- name: Build
run: npm run build

- name: Publish Package
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}


0 comments on commit 64099ac

Please sign in to comment.