Skip to content

Merge pull request #131 from episerver/feature/AFORM-4155-update-for-… #539

Merge pull request #131 from episerver/feature/AFORM-4155-update-for-…

Merge pull request #131 from episerver/feature/AFORM-4155-update-for-… #539

Workflow file for this run

name: Optimizely Headless Form CI
on:
push:
branches:
- master
- develop
- feature/*
- bugfix/*
pull_request:
branches: [ "develop" ]
permissions:
contents: write
packages: write
id-token: write
env:
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
jobs:
build:
name: Build, test, and publish
runs-on: windows-latest
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Setup dependencies
run: npm ci
- name: Run build SDK
run: npm run build --if-present
- name: Run unit test
run: npm test
- name: Apply Versioning
run: |
echo "running on branch" ${{env.BRANCH_NAME}}
${{ github.workspace}}/build/get-versionSuffix.ps1 ${{env.BRANCH_NAME}} ${{github.RUN_NUMBER}}
- name: Publish
if: ${{ github.ref == 'refs/heads/master' }}
run: npm run publish