Skip to content

Fix tests

Fix tests #10

Workflow file for this run

name: ci-futurepay-form-integration
on:
push:
tags:
- v*
branches:
- main
paths:
- src/**
- tests/**
- build/**
- .github/workflows/ci.yml
pull_request:
branches:
- main
paths:
- src/**
- tests/**
- build/**
- .github/workflows/ci.yml
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get source
uses: actions/checkout@v2
- name: Get Build Version
run: |
Import-Module .\build\GetBuildVersion.psm1
$version = GetBuildVersion -VersionString $Env:GITHUB_REF
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
Write-Host $version
shell: pwsh
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '17.x'
registry-url: 'https://registry.npmjs.org'
- name: Restore dependencies
run: npm install
- name: Update Version
run: npm version $BUILD_VERSION --no-git-tag-version --allow-same-version
- name: Build
run: npm run build
- name: Copy package.json to dist
run: cp "package.json" "./dist/package.json"
- name: Copy README.md to dist
run: cp "README.md" "./dist/README.md"
- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
working-directory: dist
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}