Skip to content

use more appropriate static_url() #222

use more appropriate static_url()

use more appropriate static_url() #222

Workflow file for this run

name: create release
on:
push:
branches:
- main
tags:
- '20*'
- 'deploy-*'
workflow_dispatch:
# stop if a second commit is pushed and a new action starts
#concurrency:
# group: '${{ github.workflow }}-${{ github.ref }}'
# cancel-in-progress: true
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: check out repository
uses: actions/checkout@v4
- name: set up node v20
uses: actions/setup-node@v4
with:
node-version: "20"
- name: cache composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: "${{ runner.os }}-${{ hashFiles('**/composer.lock') }}"
- name: disable DEBUG
run: "sed -i '/define..DEBUG/s/1/0/' codepoints.net/index.php"
- name: install composer packages
uses: php-actions/composer@v6
with:
php_version: "8.1"
php_extensions: zip
command: install
args: --quiet
- name: install npm packages
run: npm ci --silent --audit false --fund false
- name: patch npm packages
run: npm run postinstall
- name: run vite
run: npm run build
env:
NODE_ENV: production
- name: run tests
run: make test-js test-php
- name: remove PHP dev packages again
uses: php-actions/composer@v6
with:
php_version: "8.1"
php_extensions: zip
command: install
args: --optimize-autoloader --quiet --no-dev
if: startsWith(github.ref, 'refs/tags/')
- name: publish current version
run: "echo '${{ github.ref_name }}' > codepoints.net/version.txt"
- name: create zip file for release
run: zip -r codepoints codepoints.net
if: startsWith(github.ref, 'refs/tags/')
- name: create release
uses: softprops/action-gh-release@v1
with:
files: codepoints.zip
if: startsWith(github.ref, 'refs/tags/')