From 82d968dcd949418f7ae80a816c7804d7c3a8dc8c Mon Sep 17 00:00:00 2001 From: Germey Tsui Date: Mon, 1 Jan 2024 20:22:39 +0800 Subject: [PATCH] update pipelines --- .github/workflows/publish.yaml | 22 ++++++++++++++-------- package.json | 1 + 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3352152..bd71914 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,9 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: - fetch-depth: 0 + persist-credentials: false + - name: Set up Node.js uses: actions/setup-node@v2 with: @@ -23,13 +24,18 @@ jobs: - name: Install dependencies run: yarn install - - name: Run yarn bump and generate changelog - run: yarn bump + - name: Build + run: yarn build - - name: Commit and Push changes + - name: Set git credentials run: | git config --global user.name 'GitHub Actions' git config --global user.email 'actions@github.com' - git add -A - git commit -m "Bump version and update changelog" - git push + git remote set-url origin "https://$REPO_PAT@github.com/ZhiShuYun/HubFrontend" + env: + REPO_PAT: ${{ secrets.REPO_PAT }} + + - name: Publish + run: yarn publish -- --token "$NPM_TOKEN" + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 1a0250c..4b614fd 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "change": "npx beachball change --no-commit", "verify": "npx beachball check", "bump": "npx beachball bump", + "publish": "npx beachball publish --access public", "prepare": "husky install" }, "dependencies": {