Skip to content

Release 10.8.6

Release 10.8.6 #48

Workflow file for this run

name: Tag
on:
push:
tags:
- "*"
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 }}
# Add sentry token
- name: Sentry token
run: ./.github/scripts/sentry.sh
env:
TOKEN: ${{ secrets.SENTRY_TOKEN }}
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
- name: Install
run: npm ci
- name: Build
run: npm run ${{ steps.variables.outputs.BUILD_SCRIPT }} -- --env release=true --env basename="v/${{ steps.variables.outputs.VERSION }}" --env semver=${{ steps.variables.outputs.VERSION }} --env info_version=${{ steps.variables.outputs.VERSION }} --env github_actions=true
- name: Create latest version reference file
run: |
echo "{ \"latestVersion\" : \"${{ steps.variables.outputs.VERSION }}\" }" > ./dist/latestVersion.json
- name: Azure Login
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- 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_PROD }} --overwrite
- name: Create Release
# Only create a release on one brand to avoid duplicate error
if: contains(matrix.brand, 'swedbankpay')
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Design Guide v${{ steps.variables.outputs.VERSION }}
body_path: RELEASE_NOTES.md
draft: true # Let's see if everything is nice and dandy before setting this to false
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install
run: npm ci
- name: Build
run: npm run build:prod -- --env github_actions=true
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
access: "public"