feat: create deploy ci

This commit is contained in:
Aarnav Tale
2023-01-25 10:39:31 -05:00
parent c370e32093
commit 641b6b74db
3 changed files with 34 additions and 4 deletions

30
.github/workflows/deploy.yaml vendored Normal file
View File

@@ -0,0 +1,30 @@
on:
push:
tags:
- '*'
- '!v1'
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build latest dist/ folder
run: |
npm install -g pnpm
pnpm install --frozen-lockfile
pnpm run build
- name: Upload dist/ folder
run: |
git config --global user.email "<41898282+github-actions[bot]@users.noreply.github.com>"
git config --global user.name "github-actions[bot]"
git rm -rf .
git clean -fdx
git reset --hard
git checkout --orphan v1
git add dist README.md LICENSE action.yaml
git commit -m "chore: create v1 release ($GITHUB_SHA)"
git tag --force v1
git push -f --tags origin v1