2023-03-29 23:12:24 +00:00
|
|
|
name: Publish npm package to gitea
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
jobs:
|
|
|
|
npm_publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-11-21 22:43:48 +00:00
|
|
|
node-version: [ 18.x ]
|
2023-03-29 23:12:24 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-11-21 22:43:48 +00:00
|
|
|
- name: Download yarn
|
|
|
|
run: |
|
2023-11-21 22:45:07 +00:00
|
|
|
curl -fsSL -o /usr/local/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.21/yarn-1.22.21.js
|
|
|
|
chmod +x /usr/local/bin/yarn
|
2023-03-29 23:12:24 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- run: yarn
|
|
|
|
- name: Run yarn build
|
|
|
|
run: |
|
|
|
|
yarn build
|
|
|
|
- name: Configure git.vdb.to npm registry
|
|
|
|
run: |
|
|
|
|
npm config set registry https://git.vdb.to/api/packages/cerc-io/npm/
|
|
|
|
- name: Authenticate to git.vdb.to registry
|
|
|
|
run: |
|
|
|
|
npm config set -- '//git.vdb.to/api/packages/cerc-io/npm/:_authToken' "${{ secrets.GITEA_PUBLISH_TOKEN }}"
|
2023-11-21 22:54:45 +00:00
|
|
|
- name: npm publish
|
|
|
|
run: |
|
|
|
|
npm publish
|