From 270f4160110e0a5e0c2ace54374732cb7980c1d9 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Wed, 24 May 2023 15:13:22 +0500 Subject: [PATCH 1/9] feat: config semantic release work around --- .github/workflows/ci.yml | 70 ++++++++++++++++++++++------------- .github/workflows/release.yml | 2 +- .releaserc | 6 ++- 3 files changed, 49 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7dd78584..48af757d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,36 +1,54 @@ name: Default CI + on: push: branches: - - master + - master pull_request: branches: - - '**' + - '**' + jobs: tests: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Setup Nodejs Env - run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV - - name: Setup Nodejs - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VER }} - - name: Install dependencies - run: npm ci - - name: Validate package-lock.json changes - run: make validate-no-uncommitted-package-lock-changes - - name: Lint - run: npm run lint - - name: Test - run: npm run test - - name: Build - run: npm run build - - name: i18n_extract - run: npm run i18n_extract - - name: Coverage - uses: codecov/codecov-action@v3 + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Nodejs Env + run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV + - name: Setup Nodejs + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VER }} + - name: Install dependencies + run: npm ci + - name: Validate package-lock.json changes + run: make validate-no-uncommitted-package-lock-changes + - name: Lint + run: npm run lint + - name: Test + run: npm run test + - name: Build + run: npm run build + - name: i18n_extract + run: npm run i18n_extract + - name: Coverage + uses: codecov/codecov-action@v3 + - name: prep plugins + run: npm install -D @semantic-release/changelog @semantic-release/git @semantic-release/exec + - name: Run semantic release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release + id: ver + outputs: + output1: ${{ steps.ver.outputs.nextVer }} + + print: + needs: tests + runs-on: ubuntu-20.04 + steps: + - name: Print version + run: echo ${{ needs.tests.outputs.output1 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b2087a5a..f6f57f330 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,4 +38,4 @@ jobs: semantic_version: 16 env: GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} \ No newline at end of file diff --git a/.releaserc b/.releaserc index b5529bf00..bd3768bb4 100644 --- a/.releaserc +++ b/.releaserc @@ -15,13 +15,15 @@ "prepare": "@semantic-release/npm", "publish": [ "@semantic-release/npm", + "@semantic-release/exec", { "path": "@semantic-release/github", "assets": { "path": "dist/*" - } + }, + "publishCmd": "echo ::set-output name=nextVer::${nextRelease.version}" } ], "success": [], "fail": [] -} +} \ No newline at end of file From d96b54ec71e36297b4800fe85abda40186052ad3 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Thu, 25 May 2023 17:38:57 +0500 Subject: [PATCH 2/9] refactor: update releaserc file --- .releaserc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.releaserc b/.releaserc index bd3768bb4..37080ca47 100644 --- a/.releaserc +++ b/.releaserc @@ -15,14 +15,17 @@ "prepare": "@semantic-release/npm", "publish": [ "@semantic-release/npm", - "@semantic-release/exec", { "path": "@semantic-release/github", "assets": { "path": "dist/*" - }, + } + }, + ["@semantic-release/exec", + { "publishCmd": "echo ::set-output name=nextVer::${nextRelease.version}" } + ] ], "success": [], "fail": [] From f828ce6461d8d990ff78237ca9f5d133ca8dc799 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Thu, 25 May 2023 17:55:22 +0500 Subject: [PATCH 3/9] refactor: update releaserc file --- .releaserc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.releaserc b/.releaserc index 37080ca47..7bf1ab6fb 100644 --- a/.releaserc +++ b/.releaserc @@ -1,5 +1,12 @@ { "branch": "master", + "plugins": [ + ["@semantic-release/exec", + { + "publishCmd": "echo ::set-output name=nextVer::${nextRelease.version}" + } + ] + ], "tagFormat": "v${version}", "verifyConditions": [ "@semantic-release/npm", @@ -20,12 +27,7 @@ "assets": { "path": "dist/*" } - }, - ["@semantic-release/exec", - { - "publishCmd": "echo ::set-output name=nextVer::${nextRelease.version}" - } - ] + } ], "success": [], "fail": [] From 0c536b30dd5e829fa8c1cabb91b7ead3f9710bd1 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 26 May 2023 15:55:41 +0500 Subject: [PATCH 4/9] refactor: update ci file --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48af757d3..39e832023 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,4 +51,4 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Print version - run: echo ${{ needs.tests.outputs.output1 }} + run: echo ${{ needs.tests.steps.ver.outputs.nextVer }} From e3c77460eb4829742c4acd80536332a200576418 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 26 May 2023 16:04:36 +0500 Subject: [PATCH 5/9] refactor: update ci file --- .github/workflows/ci.yml | 2 +- .releaserc | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39e832023..48af757d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,4 +51,4 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Print version - run: echo ${{ needs.tests.steps.ver.outputs.nextVer }} + run: echo ${{ needs.tests.outputs.output1 }} diff --git a/.releaserc b/.releaserc index 7bf1ab6fb..1b6ddd9b1 100644 --- a/.releaserc +++ b/.releaserc @@ -1,6 +1,16 @@ { - "branch": "master", + "branches": [ + "mashal-m/semantic-release-workaround", + "master", + { + "name": "beta", + "prerelease": true + } + ], "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github", ["@semantic-release/exec", { "publishCmd": "echo ::set-output name=nextVer::${nextRelease.version}" From eca0c852c91ff27fd220b68fe083fe2f7951d976 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 26 May 2023 16:09:11 +0500 Subject: [PATCH 6/9] refactor: update ci file --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48af757d3..98e0c3b70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: run: npm install -D @semantic-release/changelog @semantic-release/git @semantic-release/exec - name: Run semantic release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} run: npx semantic-release id: ver outputs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6f57f330..005db5dfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,4 +38,5 @@ jobs: semantic_version: 16 env: GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} \ No newline at end of file + NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + \ No newline at end of file From 725fcb1b687c262787369ff47f4de58cc105dcf0 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 26 May 2023 16:15:05 +0500 Subject: [PATCH 7/9] refactor: update ci file --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98e0c3b70..18d48e4c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,7 @@ jobs: - name: Run semantic release env: GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} run: npx semantic-release id: ver outputs: @@ -51,4 +52,4 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Print version - run: echo ${{ needs.tests.outputs.output1 }} + run: echo ${{ needs.tests.outputs.output1 }} \ No newline at end of file From ee92f5e63a76529b1bb7a1a23f07c258b587f458 Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 26 May 2023 16:31:12 +0500 Subject: [PATCH 8/9] refactor: update ci file --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18d48e4c2..59ef793f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,9 @@ jobs: NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} run: npx semantic-release id: ver + run: echo "test=hello" >> "$GITHUB_OUTPUT" outputs: - output1: ${{ steps.ver.outputs.nextVer }} + output1: ${{ steps.ver.outputs.test }} print: needs: tests From acd118a46786ee01469d716845fecb9730a4358b Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 26 May 2023 16:38:53 +0500 Subject: [PATCH 9/9] refactor: update ci file --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59ef793f8..18d48e4c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,9 +44,8 @@ jobs: NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} run: npx semantic-release id: ver - run: echo "test=hello" >> "$GITHUB_OUTPUT" outputs: - output1: ${{ steps.ver.outputs.test }} + output1: ${{ steps.ver.outputs.nextVer }} print: needs: tests