-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
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: ./ |