mirror of
https://github.com/Polaris-Entertainment/bytefy.git
synced 2026-04-09 09:29:39 +00:00
74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
name: Build and Release Angular App
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [22.1]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install dependencies and build Angular app
|
|
run: |
|
|
cd ./tools
|
|
npm install --force
|
|
npm run build
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: angular-app
|
|
path: tools/dist/angular-app
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download build artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: angular-app
|
|
path: tools/dist/angular-app
|
|
|
|
- name: Create GitHub Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.sha }}
|
|
release_name: Release ${{ github.sha }}
|
|
draft: false
|
|
prerelease: false
|
|
|
|
- name: Upload build artifact to Release
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: tools/dist/angular-app
|
|
asset_name: angular-app.zip
|
|
asset_content_type: application/zip
|