Skip to content

Workflow file for this run

name: Build and Publish NPM Package
on:
release:
types: [ published ]
env:
NODE_VERSION: ">=18.12.1"
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.FLOWCORE_MACHINE_GITHUB_TOKEN }}
submodules: true
- name: Extract version from package.json
uses: sergeysova/jq-action@v2
id: version
with:
cmd: 'jq .version package.json -r'
- name: Show my version
run: 'echo "version ${{ steps.version.outputs.value }}"'
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: "https://registry.npmjs.org"
cache: yarn
- name: Yarn install
run: |
yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Start Keycloak
run: |
docker-compose -f test/docker/docker-compose.yaml up -d
chmod +x test/docker/await-testing.sh
test/docker/await-testing.sh
- name: Test
run: yarn test --passWithNoTests
- name: Build
run: yarn build
- name: Publish
run: yarn publish --access public --non-interactive --new-version ${{ steps.version.outputs.value }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}