Set timeline and roadmap titles #5
Workflow file for this run
This file contains hidden or 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 | |
| permissions: | |
| contents: write # This is required to allow the action to create a GitHub Release | |
| 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.3" | |
| # Node stuff | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Install node dependencies | |
| run: pnpm i | |
| - name: Build assets | |
| run: pnpm run build | |
| - name: Install PHP dependencies | |
| run: composer install | |
| # Cleanup crap | |
| - name: Remove dev files | |
| run: | | |
| rm -rf .github | |
| rm -rf .vscode | |
| rm -rf .git | |
| rm -rf dev | |
| rm -rf node_modules | |
| rm -rf src/assets | |
| rm -rf vendor/avalon/framework/.git | |
| rm ./.eslintrc.cjs | |
| rm .gitignore | |
| rm ./.prettierrc.json | |
| rm ./*.json | |
| rm ./*.lock | |
| rm ./*.yml | |
| rm ./*.yaml | |
| rm ./*.js | |
| rm ./*.ts | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4.3.4 | |
| with: | |
| name: traq-${{ github.ref_name }} | |
| path: ./ | |
| # Create a zip and tar.gz archive of the build | |
| - name: Create Release Archives | |
| run: | | |
| zip -r ../traq-${{ github.ref_name }}.zip . -x "traq-${{ github.ref_name }}.tar.gz" -x "traq-${{ github.ref_name }}.zip" | |
| tar -czf ../traq-${{ github.ref_name }}.tar.gz --exclude="traq-${{ github.ref_name }}.tar.gz" --exclude="traq-${{ github.ref_name }}.zip" . | |
| # Create the GitHub Release | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| # This line automatically sets the prerelease flag | |
| # if the tag name contains '-alpha' or '-beta' | |
| prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') }} | |
| # This attaches both archives to the release using a glob pattern | |
| files: ../traq-${{ github.ref_name }}.* | |
| env: | |
| # The GITHUB_TOKEN is automatically provided by Actions | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |