Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlawr committed Jun 17, 2024
1 parent f4a1ef4 commit b180678
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 56 deletions.
59 changes: 3 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 'main'
- 'ci'
tags:
- 'v*.*.*'
pull_request:
Expand Down Expand Up @@ -44,52 +45,7 @@ jobs:
path: |
${{ github.workspace }}/node_modules
ci-hosted:
needs:
- deps
timeout-minutes: 30
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
persist-credentials: false
- name: Setup Pnpm
uses: pnpm/action-setup@v4
with:
version: 9.3.0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'
cache: 'pnpm'
- name: Unarchive Modules
timeout-minutes: 5
uses: actions/cache/restore@v4
with:
key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
path: |
${{ github.workspace }}/node_modules
- name: Build
run: scripts/build
env:
COS_BUCKET: '${{ secrets.COS_BUCKET }}'
COS_REGION: '${{ secrets.COS_REGION }}'
- name: Release
uses: TencentCloud/cos-action@b0aa648235fb35a1bdd6a77f529eb0ac4c2f1c25
if: github.event_name == 'push'
with:
secret_id: '${{ secrets.CI_TECENTCOS_SECRET_ID }}'
secret_key: '${{ secrets.CI_TECENTCOS_SECRET_KEY }}'
cos_bucket: '${{ secrets.COS_BUCKET }}'
cos_region: '${{ secrets.COS_REGION }}'
local_path: dist
remote_path: latest
accelerate: true
clean: false

ci-emebeded:
publish:
needs:
- deps
if: github.event_name == 'push'
Expand All @@ -100,22 +56,13 @@ jobs:
version: ['latest', '${{ github.ref_name }}']
exclude:
- version: 'main'
- version: 'ci'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
persist-credentials: false
- name: Setup Pnpm
uses: pnpm/action-setup@v4
with:
version: 9.3.0
- name: Setup Node
timeout-minutes: 5
uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'
cache: 'pnpm'
- name: Unarchive Node Modules
timeout-minutes: 5
uses: actions/cache/restore@v4
Expand Down
4 changes: 4 additions & 0 deletions scripts/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -ex

npm run build ${BASE_ARGS:-}

0 comments on commit b180678

Please sign in to comment.