Skip to content

[ON_PUSH fsm-shell] 4312d009bea6ca9b78cfd4c4f6e6b14af7d1c95c #7

[ON_PUSH fsm-shell] 4312d009bea6ca9b78cfd4c4f6e6b14af7d1c95c

[ON_PUSH fsm-shell] 4312d009bea6ca9b78cfd4c4f6e6b14af7d1c95c #7

Workflow file for this run

name: fsm-shell push
run-name: '[ON_PUSH fsm-shell] ${{ github.sha }}'
on:
pull_request:
branches: [master]
jobs:
ensure-mandatory-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
env:
REQUIRED_FILES: CHANGELOG.md package.json package-lock.json
run: |

Check failure on line 16 in .github/workflows/fsh-shell_push.yml

View workflow run for this annotation

GitHub Actions / fsm-shell push

Invalid workflow file

The workflow is not valid. .github/workflows/fsh-shell_push.yml (Line: 16, Col: 14): Unexpected symbol: '$REQUIRED_FILES'. Located at position 1 within expression: $REQUIRED_FILES
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
FILES_CHANGED=$(git diff --diff-filter='AMTCR' --name-only origin/master HEAD | tr '[:upper:]' '[:lower:]')
echo $FILES_CHANGED
array=( ${{ $REQUIRED_FILES }} )
missing_files=""
for i in "${array[@]}"
do
[[ ${FILES_CHANGED[*]} =~ $i ]] && echo "$i file found in the changeset" || missing_files="$missing_files $i"
done
echo ""
[ -z "$missing_files" ] && echo "All mandatory files have been modified" || echo "Following files $missing_files have not been modified"
[ -z "$missing_files" ] && exit 0 || exit 1
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm i
- name: Unit tests
run: npm run test:ci:headless
publish:
runs-on: ubuntu-latest
needs:
- test
- ensure-mandatory-files
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm i
- name: Run build
run: npm run build
- name: Prepare files
run: |
mkdir npm_public
mv release package.json package-lock.json npm_public
cd npm_public
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc
- name: Publish
run: |
cd npm_public