Skip to content

SWED-2230 update package-lock #2182

SWED-2230 update package-lock

SWED-2230 update package-lock #2182

Workflow file for this run

name: Main
on:
push:
branches:
- "feature/**"
- "develop"
- "release/**"
jobs:
build:
name: Build and deploy
runs-on: ubuntu-latest
strategy:
matrix:
brand: ["payex", "swedbankpay"]
steps:
- uses: actions/checkout@v3
# Set brand specific variables
- name: Environment variables
id: variables
run: ./.github/scripts/variables.sh --brand ${{ matrix.brand }} --ref ${{ github.ref }}
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install
run: npm ci
- name: Build
run: npm run ${{ steps.variables.outputs.BUILD_SCRIPT }} -- --env basename=${{ steps.variables.outputs.BRANCH }} --env semver=${{ steps.variables.outputs.BRANCH }} --env info_version=${{ steps.variables.outputs.VERSION }} --env github_actions=true
- name: Create latest version reference file
run: |
echo "{ \"latestVersion\" : \"${{ steps.variables.outputs.BRANCH }}\" }" > ./dist/latestVersion.json
- name: Azure Login
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS_STAGE }}
- name: Azure Deploy
uses: azure/CLI@v1
with:
azcliversion: 2.43.0
inlineScript: |
az storage blob upload-batch -s dist -d \$web --account-name ${{ steps.variables.outputs.AZURE_ACCOUNT_STAGE }} --overwrite