From 47a0b154b41a37af91453273d675c5b38d144197 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Wed, 8 May 2024 11:47:07 -0300 Subject: [PATCH 01/11] feat: add beta release workflow --- .github/workflows/beta-release.yaml | 63 ++++++++++++++++++++++ beta-release.js | 82 +++++++++++++++++++++++++++++ package-lock.json | 1 + package.json | 3 +- 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/beta-release.yaml create mode 100644 beta-release.js diff --git a/.github/workflows/beta-release.yaml b/.github/workflows/beta-release.yaml new file mode 100644 index 0000000000..b83c19cda9 --- /dev/null +++ b/.github/workflows/beta-release.yaml @@ -0,0 +1,63 @@ +name: Beta Release + +on: + workflow_call: + +jobs: + beta_release: + runs-on: ubuntu-latest + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - uses: actions/setup-node@v4 + with: + node-version: "18.x" + registry-url: "https://registry.npmjs.org" + cache: "yarn" + + - name: Install dev dependencies + run: yarn install + + - name: Setup npm credentials file + run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> .npmrc + + - name: Setup git credentials + run: | + git config --global user.name 'Auto Release Bot' + git config --global user.email 'auto-release-bot@users.noreply.github.com' + + - name: Get current package.json version + run: echo "PACKAGE_VERSION=$(npm pkg get version)" >> $GITHUB_ENV + + - name: Setup Beta Release Version + run: node beta-release.js --issue $GITHUB_PR_NUMBER + env: + GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} + + - name: Release a new beta version + run: npm publish --tag beta + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `Beta version released with the last commit 🚀 + + \`\`\` + yarn add react-tooltip@${{ env.NEW_VERSION }} + \`\`\` + or + \`\`\` + npm install react-tooltip@${{ env.NEW_VERSION }} + \`\`\` + ` + }) diff --git a/beta-release.js b/beta-release.js new file mode 100644 index 0000000000..60fbbf764c --- /dev/null +++ b/beta-release.js @@ -0,0 +1,82 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const util = require("util"); +const exec = util.promisify(require("child_process").exec); +const packageJson = require("./package.json"); + +const args = require("minimist")(process.argv.slice(2)); + +const issueNumber = args["issue"]; + +console.log(issueNumber); + +const runCommand = async (command) => { + return new Promise((resolve) => { + exec(command, (error, stdout, stderr) => { + resolve({ error, stdout, stderr }); + }); + }); +}; + +const AutoBetaRelease = async () => { + // get all the versions of the package from npm + const { stdout } = await runCommand(`npm view . versions --json`); + + // show npm published versions of this package + console.log(stdout); + + // check if there is a beta release with the same issue number on published versions + const arrayOfBetaReleases = JSON.parse(stdout).filter((version) => + version.includes(`${packageJson.version}-beta.${issueNumber}`) + ); + + let fullLastBetaRelease = null; + + // if yes, get the latest beta release. Output: 1.0.0-beta.1.rc.0 + if (arrayOfBetaReleases.length) { + fullLastBetaRelease = + arrayOfBetaReleases[arrayOfBetaReleases.length - 1]; + } + + console.log("Last Beta Release: ", fullLastBetaRelease); + + let nextBetaReleaseVersion = 0; + + if (fullLastBetaRelease) { + const lastBetaReleaseRCVersionArray = + fullLastBetaRelease.match(/rc.+[0-9]+/g); + + const lastBetaReleaseRCVersion = + lastBetaReleaseRCVersionArray && + lastBetaReleaseRCVersionArray.length + ? lastBetaReleaseRCVersionArray[0] + : null; + + const lastBetaReleaseVersion = lastBetaReleaseRCVersion + ? lastBetaReleaseRCVersion.split(".")[1] + : 0; + + nextBetaReleaseVersion = parseInt(lastBetaReleaseVersion, 10) + 1; + } + + // next beta release version. Output: 1.0.0-beta.1.rc.1 + const nextBetaReleaseVesionFull = `${packageJson.version}-beta.${issueNumber}.rc.${nextBetaReleaseVersion}`; + + // update the beta version on packageJson.json + const { error } = await runCommand( + `npm version ${nextBetaReleaseVesionFull} --no-git-tag-version` + ); + + if (error) { + console.error(error); + return; + } + + // the beta version is already updated on package.json on the next line + console.log("Next Beta version: ", `${nextBetaReleaseVesionFull}`); + + await runCommand( + `echo "NEW_VERSION=${nextBetaReleaseVesionFull}" >> $GITHUB_ENV` + ); +}; + +AutoBetaRelease(); diff --git a/package-lock.json b/package-lock.json index 032805a5b1..a395b1ca39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,6 +52,7 @@ "jest-extended": "^1.2.1", "jest-raw-loader": "^1.0.1", "lint-staged": "^13.3.0", + "minimist": "^1.2.8", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", "pixelmatch": "^5.3.0", diff --git a/package.json b/package.json index c0440bde04..aaf8692ae5 100644 --- a/package.json +++ b/package.json @@ -89,8 +89,8 @@ "esbuild": "^0.19.0", "eslint": "^8.38.0", "eslint-plugin-jest": "^27.6.0", - "eslint-plugin-no-mixed-operators": "^1.1.1", "eslint-plugin-jsdoc": "^48.0.0", + "eslint-plugin-no-mixed-operators": "^1.1.1", "fs-extra": "^11.2.0", "glob": "^8.1.0", "http-server": "^14.1.1", @@ -100,6 +100,7 @@ "jest-extended": "^1.2.1", "jest-raw-loader": "^1.0.1", "lint-staged": "^13.3.0", + "minimist": "^1.2.8", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", "pixelmatch": "^5.3.0", From dff62c1e1178098de88482e262595ab35b0f1e79 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Wed, 8 May 2024 16:00:04 -0300 Subject: [PATCH 02/11] chore: rename beta release message from react-tooltip to pixi.js --- .github/workflows/beta-release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beta-release.yaml b/.github/workflows/beta-release.yaml index b83c19cda9..af6318e0c2 100644 --- a/.github/workflows/beta-release.yaml +++ b/.github/workflows/beta-release.yaml @@ -53,11 +53,11 @@ jobs: body: `Beta version released with the last commit 🚀 \`\`\` - yarn add react-tooltip@${{ env.NEW_VERSION }} + yarn add pixi.js@${{ env.NEW_VERSION }} \`\`\` or \`\`\` - npm install react-tooltip@${{ env.NEW_VERSION }} + npm install pixi.js@${{ env.NEW_VERSION }} \`\`\` ` }) From 47bf56df760f8d1c7501960a12e6b2d185b2a48d Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Wed, 15 May 2024 18:23:09 -0300 Subject: [PATCH 03/11] chore: refactor auto beta release to be publish branch --- .github/workflows/beta-release.yaml | 63 -------------------- .github/workflows/publish-branch.yaml | 77 +++++++++++++++++++++++++ beta-release.js | 82 --------------------------- update-branch-version.js | 37 ++++++++++++ 4 files changed, 114 insertions(+), 145 deletions(-) delete mode 100644 .github/workflows/beta-release.yaml create mode 100644 .github/workflows/publish-branch.yaml delete mode 100644 beta-release.js create mode 100644 update-branch-version.js diff --git a/.github/workflows/beta-release.yaml b/.github/workflows/beta-release.yaml deleted file mode 100644 index af6318e0c2..0000000000 --- a/.github/workflows/beta-release.yaml +++ /dev/null @@ -1,63 +0,0 @@ -name: Beta Release - -on: - workflow_call: - -jobs: - beta_release: - runs-on: ubuntu-latest - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - uses: actions/setup-node@v4 - with: - node-version: "18.x" - registry-url: "https://registry.npmjs.org" - cache: "yarn" - - - name: Install dev dependencies - run: yarn install - - - name: Setup npm credentials file - run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> .npmrc - - - name: Setup git credentials - run: | - git config --global user.name 'Auto Release Bot' - git config --global user.email 'auto-release-bot@users.noreply.github.com' - - - name: Get current package.json version - run: echo "PACKAGE_VERSION=$(npm pkg get version)" >> $GITHUB_ENV - - - name: Setup Beta Release Version - run: node beta-release.js --issue $GITHUB_PR_NUMBER - env: - GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} - - - name: Release a new beta version - run: npm publish --tag beta - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - uses: actions/github-script@v6 - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `Beta version released with the last commit 🚀 - - \`\`\` - yarn add pixi.js@${{ env.NEW_VERSION }} - \`\`\` - or - \`\`\` - npm install pixi.js@${{ env.NEW_VERSION }} - \`\`\` - ` - }) diff --git a/.github/workflows/publish-branch.yaml b/.github/workflows/publish-branch.yaml new file mode 100644 index 0000000000..e3519d2604 --- /dev/null +++ b/.github/workflows/publish-branch.yaml @@ -0,0 +1,77 @@ +name: Publish Branch + +on: + push: + branches: + - main + - dev + +jobs: + release_candidate: + runs-on: ubuntu-latest + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - uses: actions/setup-node@v4 + with: + node-version: "16.x" + registry-url: "https://registry.npmjs.org" + cache: "yarn" + + - name: Install dev dependencies + run: yarn install + + - name: Setup npm credentials file + run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> .npmrc + + # - name: Setup git credentials + # run: | + # git config --global user.name 'Auto Release Bot' + # git config --global user.email 'auto-release-bot@users.noreply.github.com' + + - name: Get current package.json version + run: echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV + + # get the sort SHA and add it into the environment variables + - name: Get short SHA + run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV + + # get the package name so the workflow can be reusable between projects + # - name: Get current package.json name + # run: echo "PACKAGE_NAME=$(npm pkg get name | tr -d '"')" >> $GITHUB_ENV + + - name: Setup Branch Release Candidate Version + run: echo "NEW_VERSION=$PACKAGE_VERSION-$BRANCH_NAME.$SHORT_SHA" >> $GITHUB_ENV + + - name: Update Package.json Version with Release Candidate Version + run: node ./update-branch-version.js --version $NEW_VERSION + + - name: Publish a new branch release candidate version + run: npm publish --tag $BRANCH_NAME + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + # This comment only works for Pull Requests + # - uses: actions/github-script@v6 + # with: + # script: | + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: `Release candidate released with the last commit 🚀 + + # \`\`\` + # yarn add ${{ env.PACKAGE_NAME}}@${{ env.NEW_VERSION }} + # \`\`\` + # or + # \`\`\` + # npm install ${{ env.PACKAGE_NAME}}@${{ env.NEW_VERSION }} + # \`\`\` + # ` + # }) diff --git a/beta-release.js b/beta-release.js deleted file mode 100644 index 60fbbf764c..0000000000 --- a/beta-release.js +++ /dev/null @@ -1,82 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const util = require("util"); -const exec = util.promisify(require("child_process").exec); -const packageJson = require("./package.json"); - -const args = require("minimist")(process.argv.slice(2)); - -const issueNumber = args["issue"]; - -console.log(issueNumber); - -const runCommand = async (command) => { - return new Promise((resolve) => { - exec(command, (error, stdout, stderr) => { - resolve({ error, stdout, stderr }); - }); - }); -}; - -const AutoBetaRelease = async () => { - // get all the versions of the package from npm - const { stdout } = await runCommand(`npm view . versions --json`); - - // show npm published versions of this package - console.log(stdout); - - // check if there is a beta release with the same issue number on published versions - const arrayOfBetaReleases = JSON.parse(stdout).filter((version) => - version.includes(`${packageJson.version}-beta.${issueNumber}`) - ); - - let fullLastBetaRelease = null; - - // if yes, get the latest beta release. Output: 1.0.0-beta.1.rc.0 - if (arrayOfBetaReleases.length) { - fullLastBetaRelease = - arrayOfBetaReleases[arrayOfBetaReleases.length - 1]; - } - - console.log("Last Beta Release: ", fullLastBetaRelease); - - let nextBetaReleaseVersion = 0; - - if (fullLastBetaRelease) { - const lastBetaReleaseRCVersionArray = - fullLastBetaRelease.match(/rc.+[0-9]+/g); - - const lastBetaReleaseRCVersion = - lastBetaReleaseRCVersionArray && - lastBetaReleaseRCVersionArray.length - ? lastBetaReleaseRCVersionArray[0] - : null; - - const lastBetaReleaseVersion = lastBetaReleaseRCVersion - ? lastBetaReleaseRCVersion.split(".")[1] - : 0; - - nextBetaReleaseVersion = parseInt(lastBetaReleaseVersion, 10) + 1; - } - - // next beta release version. Output: 1.0.0-beta.1.rc.1 - const nextBetaReleaseVesionFull = `${packageJson.version}-beta.${issueNumber}.rc.${nextBetaReleaseVersion}`; - - // update the beta version on packageJson.json - const { error } = await runCommand( - `npm version ${nextBetaReleaseVesionFull} --no-git-tag-version` - ); - - if (error) { - console.error(error); - return; - } - - // the beta version is already updated on package.json on the next line - console.log("Next Beta version: ", `${nextBetaReleaseVesionFull}`); - - await runCommand( - `echo "NEW_VERSION=${nextBetaReleaseVesionFull}" >> $GITHUB_ENV` - ); -}; - -AutoBetaRelease(); diff --git a/update-branch-version.js b/update-branch-version.js new file mode 100644 index 0000000000..a71ca3a72e --- /dev/null +++ b/update-branch-version.js @@ -0,0 +1,37 @@ +/* eslint-disable prefer-destructuring */ +/* eslint-disable @typescript-eslint/no-var-requires */ +const util = require("util"); +const exec = util.promisify(require("child_process").exec); +const args = require("minimist")(process.argv.slice(2)); + +const version = args["version"]; + +console.log("version: ", version); + +const runCommand = async (command) => { + return new Promise((resolve) => { + exec(command, (error, stdout, stderr) => { + resolve({ error, stdout, stderr }); + }); + }); +}; + +/** + * @NOTE: This can't be done by only using the workflow, because when we try to update + * the version to the desired version, we get an error about wrong version format, + * but directly on CI it works as expected. + */ +const UpdateBranchVersion = async () => { + // update the release candidate version on package.json + const { error } = await runCommand(`npm version ${version}`); + + if (error) { + console.error(error); + return; + } + + // the release candidate version is already updated on package.json on the next line + console.log("Next Release Candidate version: ", `${version}`); +}; + +UpdateBranchVersion(); From ef0e179f78fd53919b8fca6d57926d2164fe5add Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Thu, 16 May 2024 09:45:31 -0300 Subject: [PATCH 04/11] chore: use npm cache instead of yarn cache Co-authored-by: Matt Karl --- .github/workflows/publish-branch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-branch.yaml b/.github/workflows/publish-branch.yaml index e3519d2604..6d26ac35d4 100644 --- a/.github/workflows/publish-branch.yaml +++ b/.github/workflows/publish-branch.yaml @@ -21,7 +21,7 @@ jobs: with: node-version: "16.x" registry-url: "https://registry.npmjs.org" - cache: "yarn" + cache: "npm" - name: Install dev dependencies run: yarn install From 35d3f283e182a8e92eae47c10d9fcbadfaac088d Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Thu, 16 May 2024 09:53:03 -0300 Subject: [PATCH 05/11] chore: refactor publish-branch.yaml to use shared setup --- .github/workflows/publish-branch.yaml | 38 ++------------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/.github/workflows/publish-branch.yaml b/.github/workflows/publish-branch.yaml index 6d26ac35d4..e9e5f12ee5 100644 --- a/.github/workflows/publish-branch.yaml +++ b/.github/workflows/publish-branch.yaml @@ -17,23 +17,13 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - uses: actions/setup-node@v4 - with: - node-version: "16.x" - registry-url: "https://registry.npmjs.org" - cache: "npm" - - name: Install dev dependencies - run: yarn install + - name: Setup Project + uses: ./.github/actions/setup - name: Setup npm credentials file run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> .npmrc - # - name: Setup git credentials - # run: | - # git config --global user.name 'Auto Release Bot' - # git config --global user.email 'auto-release-bot@users.noreply.github.com' - - name: Get current package.json version run: echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV @@ -41,10 +31,6 @@ jobs: - name: Get short SHA run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV - # get the package name so the workflow can be reusable between projects - # - name: Get current package.json name - # run: echo "PACKAGE_NAME=$(npm pkg get name | tr -d '"')" >> $GITHUB_ENV - - name: Setup Branch Release Candidate Version run: echo "NEW_VERSION=$PACKAGE_VERSION-$BRANCH_NAME.$SHORT_SHA" >> $GITHUB_ENV @@ -55,23 +41,3 @@ jobs: run: npm publish --tag $BRANCH_NAME env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - # This comment only works for Pull Requests - # - uses: actions/github-script@v6 - # with: - # script: | - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: `Release candidate released with the last commit 🚀 - - # \`\`\` - # yarn add ${{ env.PACKAGE_NAME}}@${{ env.NEW_VERSION }} - # \`\`\` - # or - # \`\`\` - # npm install ${{ env.PACKAGE_NAME}}@${{ env.NEW_VERSION }} - # \`\`\` - # ` - # }) From 27ed73ee7d35f73d06b2df4d41fca6d465669eb5 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Thu, 16 May 2024 11:55:06 -0300 Subject: [PATCH 06/11] Update .github/workflows/publish-branch.yaml Co-authored-by: Matt Karl --- .github/workflows/publish-branch.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish-branch.yaml b/.github/workflows/publish-branch.yaml index e9e5f12ee5..8a476bb6e3 100644 --- a/.github/workflows/publish-branch.yaml +++ b/.github/workflows/publish-branch.yaml @@ -28,11 +28,8 @@ jobs: run: echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV # get the sort SHA and add it into the environment variables - - name: Get short SHA - run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV - - name: Setup Branch Release Candidate Version - run: echo "NEW_VERSION=$PACKAGE_VERSION-$BRANCH_NAME.$SHORT_SHA" >> $GITHUB_ENV + run: echo "NEW_VERSION=$PACKAGE_VERSION-$BRANCH_NAME.${GITHUB_SHA::7}" >> $GITHUB_ENV - name: Update Package.json Version with Release Candidate Version run: node ./update-branch-version.js --version $NEW_VERSION From 2284b2960af6c7683c29482caf4f15bfd09630c1 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Thu, 16 May 2024 11:59:30 -0300 Subject: [PATCH 07/11] chore: refactor publish-branch workflow to handle the full workflow --- .github/workflows/publish-branch.yaml | 6 ++--- update-branch-version.js | 37 --------------------------- 2 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 update-branch-version.js diff --git a/.github/workflows/publish-branch.yaml b/.github/workflows/publish-branch.yaml index 8a476bb6e3..ffc9bc6a71 100644 --- a/.github/workflows/publish-branch.yaml +++ b/.github/workflows/publish-branch.yaml @@ -29,10 +29,10 @@ jobs: # get the sort SHA and add it into the environment variables - name: Setup Branch Release Candidate Version - run: echo "NEW_VERSION=$PACKAGE_VERSION-$BRANCH_NAME.${GITHUB_SHA::7}" >> $GITHUB_ENV + run: echo "BRANCH_VERSION=$PACKAGE_VERSION-$BRANCH_NAME.${GITHUB_SHA::7}" >> $GITHUB_ENV - - name: Update Package.json Version with Release Candidate Version - run: node ./update-branch-version.js --version $NEW_VERSION + - name: Bump version + run: npm version $BRANCH_VERSION --no-git-tag-version --force - name: Publish a new branch release candidate version run: npm publish --tag $BRANCH_NAME diff --git a/update-branch-version.js b/update-branch-version.js deleted file mode 100644 index a71ca3a72e..0000000000 --- a/update-branch-version.js +++ /dev/null @@ -1,37 +0,0 @@ -/* eslint-disable prefer-destructuring */ -/* eslint-disable @typescript-eslint/no-var-requires */ -const util = require("util"); -const exec = util.promisify(require("child_process").exec); -const args = require("minimist")(process.argv.slice(2)); - -const version = args["version"]; - -console.log("version: ", version); - -const runCommand = async (command) => { - return new Promise((resolve) => { - exec(command, (error, stdout, stderr) => { - resolve({ error, stdout, stderr }); - }); - }); -}; - -/** - * @NOTE: This can't be done by only using the workflow, because when we try to update - * the version to the desired version, we get an error about wrong version format, - * but directly on CI it works as expected. - */ -const UpdateBranchVersion = async () => { - // update the release candidate version on package.json - const { error } = await runCommand(`npm version ${version}`); - - if (error) { - console.error(error); - return; - } - - // the release candidate version is already updated on package.json on the next line - console.log("Next Release Candidate version: ", `${version}`); -}; - -UpdateBranchVersion(); From 40fb0ade958e7c202f25acc7b351a278acd40306 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Thu, 16 May 2024 12:47:29 -0300 Subject: [PATCH 08/11] chore: remove unecessary line from publish-branch workflow --- .github/workflows/publish-branch.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish-branch.yaml b/.github/workflows/publish-branch.yaml index ffc9bc6a71..726189b919 100644 --- a/.github/workflows/publish-branch.yaml +++ b/.github/workflows/publish-branch.yaml @@ -36,5 +36,3 @@ jobs: - name: Publish a new branch release candidate version run: npm publish --tag $BRANCH_NAME - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From af8f8dc391b38bd9f3e05d0ea35da8973e33678a Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Thu, 16 May 2024 12:48:11 -0300 Subject: [PATCH 09/11] chore: remove minimist package as it is not necessary anymore --- package-lock.json | 1 - package.json | 1 - 2 files changed, 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index a395b1ca39..032805a5b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,7 +52,6 @@ "jest-extended": "^1.2.1", "jest-raw-loader": "^1.0.1", "lint-staged": "^13.3.0", - "minimist": "^1.2.8", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", "pixelmatch": "^5.3.0", diff --git a/package.json b/package.json index aaf8692ae5..bb1354ac13 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,6 @@ "jest-extended": "^1.2.1", "jest-raw-loader": "^1.0.1", "lint-staged": "^13.3.0", - "minimist": "^1.2.8", "nodemon": "^3.0.2", "npm-run-all": "^4.1.5", "pixelmatch": "^5.3.0", From dd90cc08fdc748e71d013231ea72a11038a21096 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Fri, 17 May 2024 09:15:39 -0300 Subject: [PATCH 10/11] chore: remove npmrc setup from publish branch workflow --- .github/workflows/publish-branch.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/publish-branch.yaml b/.github/workflows/publish-branch.yaml index 726189b919..a406b4b528 100644 --- a/.github/workflows/publish-branch.yaml +++ b/.github/workflows/publish-branch.yaml @@ -21,9 +21,6 @@ jobs: - name: Setup Project uses: ./.github/actions/setup - - name: Setup npm credentials file - run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> .npmrc - - name: Get current package.json version run: echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV From 5ae501c1cf8468dbde958f8ecfb12c4b91a21341 Mon Sep 17 00:00:00 2001 From: Daniel Barion Date: Fri, 17 May 2024 17:35:24 -0300 Subject: [PATCH 11/11] chore: add npm run build into the publish workflow --- .github/workflows/publish-branch.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish-branch.yaml b/.github/workflows/publish-branch.yaml index a406b4b528..60a18147d6 100644 --- a/.github/workflows/publish-branch.yaml +++ b/.github/workflows/publish-branch.yaml @@ -21,6 +21,9 @@ jobs: - name: Setup Project uses: ./.github/actions/setup + - name: Build Project + run: npm run build + - name: Get current package.json version run: echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV