Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Deploy to by @giacomo-secchi #47

Deploy to by @giacomo-secchi

Deploy to by @giacomo-secchi #47

Workflow file for this run

name: Create Release
run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }}
on:
push:
tags:
- '[0-9]+\.[0-9]+\.[0-9]+'
jobs:
build:
name: Create Build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- name: Install packages
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm install
- run: npm run build --if-present
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: build-output
path: build
release:
name: Create Release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download Build Artifact
uses: actions/download-artifact@v3
with:
name: build-output
path: build
- name: Composer install
run: |
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
- name: Zip Release Asset
run: |
npm run plugin-zip
working-directory: ${{ github.workspace }}
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ github.event.repository.name}}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}