From 4a71a37cb023649b2361d55b0711e3941bf64567 Mon Sep 17 00:00:00 2001 From: chrisli30 Date: Mon, 21 Aug 2023 23:27:32 -0700 Subject: [PATCH] Updated workflow files --- .github/workflows/npm-publish-dev.yml | 18 ++++++++++++------ .github/workflows/release.yml | 7 ++++--- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/npm-publish-dev.yml b/.github/workflows/npm-publish-dev.yml index bb090cd..a22bc16 100644 --- a/.github/workflows/npm-publish-dev.yml +++ b/.github/workflows/npm-publish-dev.yml @@ -25,11 +25,17 @@ jobs: - name: 🛠️ Build run: npm run build + - name: 🔐 Authenticate with NPM + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTOMATION_TOKEN_CHRIS }}" > ~/.npmrc + - name: Publish packages to NPM with dev tag - id: changesets - uses: changesets/action@v1 - with: - publish: npm run changeset:publish-dev - env: - NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN_CHRIS }} + run: | + for dir in packages/*; do + if [ -d "$dir" ]; then + echo "Publishing $dir package" + cd "$dir" + npm publish --tag dev + cd .. + fi + done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c02b835..63bd96c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,8 +25,9 @@ jobs: run: npm ci --ignore-scripts - name: Create Release Pull Request - uses: changesets/action@v1 + uses: changesets/action@v2 with: - version: npm run changeset:version + title: Changeset Version Bump + commit: Update the version of packages with .changeset md files env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file