fix ci.yaml syntax #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run all tests, linters, code analysis and other QA tasks on | ||
# every push to main and PRs. | ||
# | ||
# To SSH into the runner to debug a failure, add the following step before | ||
# the failing step | ||
# - uses: lhotari/action-upterm@v1 | ||
# with: | ||
# limit-access-to-actor: true | ||
name: CI | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
# Prevent multiple jobs running after fast subsequent pushes | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
jobs: | ||
tests: | ||
name: 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: nix-shell --run "make lint all=true" | ||
- run: nix-shell --run "make tests" | ||
- run: nix-shell --run "make dist" | ||
- uses: teamniteo/gha-actions/uncommitted-changes@v2 | ||
publish: | ||
name: Publish to NPM | ||
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 }}' | ||
- name: Authenticate with registry | ||
with: | ||
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}' | ||
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/salarycalc/.npmrc | ||
Check failure on line 61 in .github/workflows/ci.yml GitHub Actions / CIInvalid workflow file
|
||
- 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 |