Add tag building workflow #1
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: Build Tag | |
on: | |
push: | |
tags: | |
- v*.** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup required tools | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
- name: Setup PHP Action | |
uses: shivammathur/[email protected] | |
with: | |
php-version: '8.1' | |
# Node stuff | |
# TODO: use pnpm | |
- name: Install node dependencies | |
run: npm ci | |
- name: Build assets | |
run: npm run build | |
# PHP stuff | |
- name: Update Git submodules | |
run: | | |
git submodule init | |
git submodule update | |
- name: Install PHP dependencies | |
run: composer install | |
# Cleanup crap | |
- name: Remove dev files | |
run: | | |
rm -rf node_modules | |
rm -rf dev | |
rm -rf src/assets | |
rm -rf .git | |
rm -rf vendor/avalon/.git | |
rm -rf .github | |
rm ./*.js ./*.ts ./*.yaml ./*.yml ./tsconfig.* ./package.json ./package-lock.json ./.prettierrc.json | |
rm .gitignore .gitmodules | |
# Upload build artifact | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: traq-${{ github.ref_name }} | |
path: ./ |