Skip to content

feat: update build script #2

feat: update build script

feat: update build script #2

Workflow file for this run

name: Deploy
on:
pull_request:
branches:
- feature/mozart-deps
push:
branches:
- feature/mozart-deps
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set-up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Configure GitHub token for Composer
run: composer config --global github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Add private repository to Composer's global config
run: |
composer global config repositories.mozart '{"type": "vcs", "url": "https://github.com/dkjensen/mozart"}'
- name: Install Mozart globally
run: composer global require dkjensen/mozart:dev-master
- name: Install npm packages
run: |
npm i
- name: Semantic release
id: semantic
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
branches: |
['master']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set env
if: steps.semantic.outputs.new_release_published == 'true'
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build release
if: steps.semantic.outputs.new_release_published == 'true'
shell: bash
run: |
npm run plugin-zip
- name: Release
if: steps.semantic.outputs.new_release_published == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.semantic.outputs.new_release_version }}
files: |
build/wc-cart-pdf.zip