This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
bin #4
Workflow file for this run
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
name: Build | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Install Dependencies | |
run: | | |
corepack enable | |
pnpm install | |
env: | |
CI: true | |
- name: Build Project | |
run: pnpm prod | |
- name: Packaging | |
run: | | |
pnpm package | |
rm -rf $(ls | grep -v pkg) | |
rm .gitignore | |
rm -rf .github | |
mv pkg/* . | |
- name: Deleting old build branch | |
run: | | |
BUILD_EXISTS=$(git ls-remote --heads origin build | wc -l) | |
if [ $BUILD_EXISTS -ne 0 ]; then | |
git push origin -d build | |
fi | |
- name: Checkout and update build branch | |
uses: EndBug/add-and-commit@v9 | |
with: | |
new_branch: build | |
pathspec_error_handling: exitImmediately |