All checks were successful
Publish / Publish npm package action (push) Successful in 14s
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
Publish npm package action:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 'Checkout repository'
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 'Setup dependencies'
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
registry-url: https://git.ksv741.keenetic.pro/api/packages/teacinema/npm/
|
|
scope: '@teacinema'
|
|
|
|
- name: 'Enable corepack'
|
|
run: corepack enable
|
|
|
|
- name: Create .npmrc for install dependencies
|
|
run: |
|
|
touch .npmrc
|
|
echo "@teacinema:registry=https://git.ksv741.keenetic.pro/api/packages/teacinema/npm/" >> .npmrc
|
|
echo "//git.ksv741.keenetic.pro/api/packages/teacinema/npm/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
|
|
|
- name: 'Install dependencies'
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: 'Generate contracts'
|
|
run: yarn run build
|
|
|
|
- name: Remove .npmrc
|
|
run: rm .npmrc
|
|
|
|
- name: 'Publish to Gitea npm registry'
|
|
run: npm publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|