From 3342e8bdb175d1a221af90633d57886da5e132c9 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Fri, 28 Jun 2024 10:38:50 +0800 Subject: [PATCH] Change the github action: 1. trigger tag should start with BS3 2. publish to another empty branch instead of npm. --- .github/workflows/on-release.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index 8c16fa9030..14637b4bd2 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -2,7 +2,7 @@ name: on-release on: push: tags: - - v* + - bs3* env: NX_BRANCH: ${{ github.event.number }} @@ -104,7 +104,7 @@ jobs: branch: 'gh-pages' directory: 'gh-pages' - # publish to npm + # publish package to another branch npm_publish: runs-on: ubuntu-latest needs: build @@ -118,7 +118,14 @@ jobs: with: path: dist key: dist-${{ github.run_id }} - - uses: JS-DevTools/npm-publish@v1 - with: - package: "dist/ngx-bootstrap/package.json" - token: ${{ secrets.NPM_TOKEN }} + + # Deploy to local repo + # see: https://github.com/marketplace/actions/push-git-subdirectory-as-branch + - name: Deploy + uses: s0/git-publish-subdir-action@develop + env: + REPO: self + BRANCH: dist + FOLDER: dist/ngx-bootstrap + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ github.ref_name }}-release