Skip to content

build workflow

build workflow #1

Workflow file for this run

name: Build and Package
on:
push:
branches:
- v2
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up the environment
run: choco install make python310 nodejs-lts
- name: Build the project
run: make build
- name: Generate unique archive name
id: vars
run: |
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_ENV
echo "UNIQUE_NAME=TF2-GPTChatBot-win-${{ env.COMMIT_HASH }}" >> $GITHUB_ENV
- name: Package the build into a ZIP file
run: |
mkdir output
cp -r frontend/dist/win-unpacked/* output/
powershell Compress-Archive -Path output/* -DestinationPath output/${{ env.UNIQUE_NAME }}.zip
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.UNIQUE_NAME }}
path: output/${{ env.UNIQUE_NAME }}.zip