Skip to content

Commit

Permalink
Auto-publish to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
zupo committed Feb 7, 2024
1 parent 65464b7 commit 5ecd70c
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,22 @@ jobs:

- uses: teamniteo/gha-actions/uncommitted-changes@v2

publish:
name: Publish to NPM

# yamllint disable

# TODO: rewrite this CircleCI config to GHAactions config for auto-publishing

# publish:
# executor: salarycalc

# steps:
# - checkout

# - configure_nix
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: teamniteo/gha-actions/nix@v2
with:
cache: niteo-public
auth_token: '${{ secrets.CACHIX_AUTH_TOKEN_PUBLIC }}'

# - run:
# name: Authenticate with registry
# command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/salarycalc/.npmrc
- name: Authenticate with registry
with:
NPM_TOKEN = '${{ secrets.NPM_TOKEN }}'
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/salarycalc/.npmrc

# - run:
# name: Publish the package to NPM
# command: nix-shell --run "npm version --no-git-tag-version prerelease --preid $(date +%Y-%m-%dT%H-%M-%S) && make dist && npm publish"
- name: Publish the package to NPM
run: nix-shell --run "npm version --no-git-tag-version prerelease --preid $(date +%Y-%m-%dT%H-%M-%S) && make dist && npm publish" # yamllint disable-line

0 comments on commit 5ecd70c

Please sign in to comment.