changed all usernames to lower case #18
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
name: Tests | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'Release' | |
required: true | |
default: 'true' | |
new_version: | |
description: 'New version' | |
required: true | |
default: 'one of <newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease' | |
jobs: | |
ci: | |
strategy: | |
matrix: | |
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.CI_PAT || github.token }} | |
- run: git config --global user.email "[email protected]" | |
- run: git config --global user.name "Nomo App (GitHub Action)" | |
- uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | |
- run: npm ci | |
- run: npm run build | |
- run: npm run test | |
#- run: git diff --exit-code | |
- name: Release | |
if: ${{ github.event.inputs.release == 'true' && matrix.os == 'ubuntu-latest' }} | |
run: | | |
npm version ${{ github.event.inputs.new_version }} --git-tag-version=true | |
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | |
npm publish | |
git push origin && git push origin --tags | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |