give constants types #301
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: 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: install composer packages | |
uses: php-actions/composer@v6 | |
with: | |
php_version: "8.3" | |
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.3" | |
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@v2 | |
with: | |
files: codepoints.zip | |
if: startsWith(github.ref, 'refs/tags/') |