chore: isolate shared dsh plugins into independent monorepo
This commit is contained in:
51
.gitea/workflows/publish.yml
Normal file
51
.gitea/workflows/publish.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
name: build-and-publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 11.7.0
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm -r build
|
||||
- run: pnpm -r test
|
||||
- run: pnpm -r pack
|
||||
|
||||
publish:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: build-test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 11.7.0
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm -r build
|
||||
- name: Authenticate to Gitea npm registry
|
||||
run: |
|
||||
printf '//git.byte-mate.ru/api/packages/Coder/npm/:_authToken=%s\n' "${{ secrets.GITEA_NPM_TOKEN }}" >> "$HOME/.npmrc"
|
||||
- name: Publish unpublished packages
|
||||
env:
|
||||
GITEA_NPM_TOKEN: ${{ secrets.GITEA_NPM_TOKEN }}
|
||||
run: |
|
||||
node scripts/check-published.mjs > .unpublished
|
||||
while IFS= read -r pkg; do
|
||||
[ -z "$pkg" ] && continue
|
||||
echo "Publishing $pkg"
|
||||
pnpm --filter "$pkg" publish --no-git-checks
|
||||
done < .unpublished
|
||||
Reference in New Issue
Block a user