gxc-renderer-base/.forgejo/workflows/ci.yml
Andrey Kernichniy aa8fcfb90e
Some checks failed
CI / build (push) Successful in 18s
CI / deploy (push) Failing after 0s
Update build
2026-03-03 01:30:41 +07:00

61 lines
1.4 KiB
YAML

name: CI
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: [docker]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
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
if: forgejo.event.type == 'workflow_dispatch'
runs-on: [docker]
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@v3
with:
node-version: '20'
- name: NPM Login
run: |
echo "//${{ vars.VERDACCIO_URL }}/:_authToken=${{ secrets.VERDACCIO_TOKEN }}" > ~/.npmrc
npm whoami
env:
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
- name: Publish to NPM
run: npm publish ./artifact --registry ${{ vars.VERDACCIO_URL }}
env:
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}