diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c34761..0b887c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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