Skip to content

Commit

Permalink
Add tag building workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nirix committed Jul 31, 2024
1 parent b9a4ab3 commit da8eecc
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build-tag.yml
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/setup-node@v4.0.3
with:
node-version: 20.x

- name: Setup PHP Action
uses: shivammathur/setup-php@2.31.1
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/upload-artifact@v4.3.4
with:
name: traq-${{ github.ref_name }}
path: ./

0 comments on commit da8eecc

Please sign in to comment.