Release 10.12.0 #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tag | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
name: Build and deploy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
brand: ["payex", "swedbankpay"] | |
steps: | |
- uses: actions/checkout@v4 | |
# Set brand specific variables | |
- name: Environment variables | |
id: variables | |
run: ./.github/scripts/variables.sh --brand ${{ matrix.brand }} --ref ${{ github.ref }} | |
- name: Set Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.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/login@v2.1.0 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Azure Deploy | |
uses: azure/CLI@v2 | |
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@v2 | |
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@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install | |
run: npm ci | |
- name: Build | |
run: npm run build:prod -- --env github_actions=true | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
access: "public" |