Skip to content

Commit

Permalink
ci: create main workflow (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
chemio9 authored Dec 13, 2024
1 parent e096b69 commit 2e704d6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI build
on:
push:
branches: main
pull_request:
branches: main

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: DerYeger/pnpm-setup-action@master
with:
node-version: latest
- name: Build
run: pnpm build-only
# Separate build and type check,
# because *.d.ts files aren't generated before build
- name: Type Check
run: pnpm type-check
- name: Compress action step
uses: a7ul/[email protected]
id: compress
with:
command: c
cwd: ./
files: |
./dist
outPath: dist.tar.gz
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: |
./dist.tar.gz
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist.tar.gz
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0",
"private": true,
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
Expand Down

0 comments on commit 2e704d6

Please sign in to comment.