From f19f72a0e779a063c08abebd99e5abf3d7f9d082 Mon Sep 17 00:00:00 2001 From: maphel <79743699+maphel@users.noreply.github.com> Date: Mon, 4 Sep 2023 03:17:53 +0200 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 67 ++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 047b042..292ac55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,39 +6,6 @@ on: - 'v*' jobs: - publish: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - - name: Install Yarn 3 (Berry) - run: npm install -g yarn@berry - - - name: Set up Yarn 3 - run: yarn set version berry - - - name: Install dependencies - run: yarn install --immutable - - - name: Build - run: yarn build - - - name: Exclude source maps - run: rm -rf dist/**/*.map - - - name: Publish to NPM - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - update-master-to-tagged-version: runs-on: ubuntu-latest @@ -70,3 +37,37 @@ jobs: git add package.json git commit -m "Update package.json version to $VERSION on main" git push origin main + + publish: + needs: update-master-to-tagged-version + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + + - name: Install Yarn 3 (Berry) + run: npm install -g yarn@berry + + - name: Set up Yarn 3 + run: yarn set version berry + + - name: Install dependencies + run: yarn install --immutable + + - name: Build + run: yarn build + + - name: Exclude source maps + run: rm -rf dist/**/*.map + + - name: Publish to NPM + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}