Skip to content

Commit

Permalink
ci: compile and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
cawa-93 committed Nov 12, 2024
1 parent fb38449 commit 903b389
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 75 deletions.
30 changes: 7 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
echo "- \`APP_VERSION\`: ${{ steps.APP_VERSION.outputs.APP_VERSION }}" >> $GITHUB_STEP_SUMMARY
echo "- \`APP_FULL_VERSION\`: ${{ steps.APP_FULL_VERSION.outputs.APP_FULL_VERSION }}" >> $GITHUB_STEP_SUMMARY
compile:
compile-and-test:
needs:
- prepare
uses: ./.github/workflows/compile.yml
uses: ./.github/workflows/compile-and-test.yml
with:
renderer-template: ${{ matrix.renderer-template }}
app-version: ${{ needs.prepare.outputs.APP_FULL_VERSION }}
Expand All @@ -60,36 +60,20 @@ jobs:
renderer-template:
- vanilla
- vanilla-ts
tests:
deploy:
needs:
- compile
uses: ./.github/workflows/tests.yml
- compile-and-test
uses: ./.github/workflows/compile-and-test.yml
with:
renderer-template: ${{ matrix.renderer-template }}
app-version: ${{ needs.prepare.outputs.APP_FULL_VERSION }}
strategy:
fail-fast: false
matrix:
renderer-template:
- vanilla
- vanilla-ts
# - vue
# - vue-ts
# - react
# - react-ts
# - react-swc
# - react-swc-ts
# - preact
# - preact-ts
# - lit
# - lit-ts
# - svelte
# - svelte-ts
# - solid
# - solid-ts
# Qwik Has unresolved upstream issue. So I decided to torn it off for now
# - qwik
# - qwik-ts
#

#
# dependabot:
# permissions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Compile and test

on:
workflow_call:
inputs:
Expand All @@ -19,6 +21,16 @@ env:
npm_config_fund: false

jobs:
typeckeck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init-template-with-renderer
name: Init template with "${{inputs.renderer-template}}" renderer
with:
renderer-template: ${{inputs.renderer-template}}
- run: npm run typecheck --if-present

compile:
strategy:
fail-fast: true
Expand All @@ -40,6 +52,8 @@ jobs:
env:
VITE_DISTRIBUTION_CHANNEL: ${{inputs.renderer-template}}

- run: npm run test --if-present

- name: Upload compiled app
uses: actions/upload-artifact@v4
with:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy

on:
workflow_call:
inputs:
renderer-template:
required: true
type: string
app-version:
required: true
type: string

defaults:
run:
shell: 'bash'

env:
NODE_NO_WARNINGS: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
npm_config_audit: false
npm_config_fund: false

jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{inputs.renderer-template}}
steps:
- name: Download compiled app
uses: actions/download-artifact@v4
with:
pattern: *-${{inputs.renderer-template}}
path: dist
merge-multiple: true
- run: gh release create v${{inputs.app-version}}-${{inputs.renderer-template}} dist/*${{inputs.renderer-template}}* dist/*.yml --draft
52 changes: 0 additions & 52 deletions .github/workflows/tests.yml

This file was deleted.

0 comments on commit 903b389

Please sign in to comment.