From 16c58c1b6105914436dbe2feef51453e2efbecd3 Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Fri, 17 May 2024 10:18:42 +0100 Subject: [PATCH 1/3] feat: add npm version to release pipeline [INS-3853] --- .github/workflows/release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5464af1..29c430b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,10 +27,19 @@ jobs: with: username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'insomnia-infra' }} + - name: Create new package version + run: npm version "${{ github.event.inputs.version }}" + + - name: Git Commit + run: git commit -am "Bump version to ${{ github.event.inputs.version }}" + - name: Tag the Repository run: | git tag ${{ env.TAG }} - git push origin ${{ env.TAG }} + remote_repo="https://${GITHUB_ACTOR}:${RELEASE_GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" + git push "${remote_repo}" --follow-tags + env: + RELEASE_GH_TOKEN: ${{ secrets.PAT_INSOMNIA_INFRA }} - name: Create Tag and Release uses: ncipollo/release-action@v1 From 7ecc474cfe804645d25921848a2da2d285604aff Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Fri, 17 May 2024 10:19:40 +0100 Subject: [PATCH 2/3] fix --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29c430b0..b46a2576 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,10 +28,10 @@ jobs: username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'insomnia-infra' }} - name: Create new package version - run: npm version "${{ github.event.inputs.version }}" + run: npm version "${{ env.TAG }}" - name: Git Commit - run: git commit -am "Bump version to ${{ github.event.inputs.version }}" + run: git commit -am "Bump version to ${{ env.TAG }}" - name: Tag the Repository run: | From bef500743a4788fa6f74fd1c0b8573566576ae78 Mon Sep 17 00:00:00 2001 From: Filipe Freire Date: Fri, 17 May 2024 10:23:30 +0100 Subject: [PATCH 3/3] add npm ci --- .github/workflows/release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b46a2576..9c656ae7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,12 +21,19 @@ jobs: fetch-depth: 0 token: ${{ secrets.PAT_INSOMNIA_INFRA }} - - name: Configure Git user uses: Homebrew/actions/git-user-config@master with: username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'insomnia-infra' }} + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install + run: npm ci + - name: Create new package version run: npm version "${{ env.TAG }}"