Update build
This commit is contained in:
parent
71d5894598
commit
90365b034e
6 changed files with 216 additions and 4 deletions
|
|
@ -3,11 +3,10 @@ name: CI
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch: # позволяет запускать вручную
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
# Название runner’а, который у тебя настроен
|
||||
build:
|
||||
runs-on: [docker]
|
||||
|
||||
steps:
|
||||
|
|
@ -20,4 +19,37 @@ jobs:
|
|||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: gxc-renderer-base-${{ github.sha }}
|
||||
path: ./dist/
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: [docker]
|
||||
environment: production
|
||||
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: gxc-renderer-base-${{ github.sha }}
|
||||
path: ./artifact
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: ${{ vars.VERDACCIO_URL }}
|
||||
|
||||
- name: Publish to NPM
|
||||
run: npm publish ./artifact --registry ${{ vars.VERDACCIO_URL }}
|
||||
env:
|
||||
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue