Skip to content

Commit c4a6906

Browse files
authored
feat: add npm version to release pipeline [INS-3853] (Kong#352)
* feat: add npm version to release pipeline [INS-3853] * fix * add npm ci
1 parent cfb34a7 commit c4a6906

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,32 @@ jobs:
2121
fetch-depth: 0
2222
token: ${{ secrets.PAT_INSOMNIA_INFRA }}
2323

24-
2524
- name: Configure Git user
2625
uses: Homebrew/actions/git-user-config@master
2726
with:
2827
username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'insomnia-infra' }}
2928

29+
- name: Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 20
33+
34+
- name: Install
35+
run: npm ci
36+
37+
- name: Create new package version
38+
run: npm version "${{ env.TAG }}"
39+
40+
- name: Git Commit
41+
run: git commit -am "Bump version to ${{ env.TAG }}"
42+
3043
- name: Tag the Repository
3144
run: |
3245
git tag ${{ env.TAG }}
33-
git push origin ${{ env.TAG }}
46+
remote_repo="https://${GITHUB_ACTOR}:${RELEASE_GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
47+
git push "${remote_repo}" --follow-tags
48+
env:
49+
RELEASE_GH_TOKEN: ${{ secrets.PAT_INSOMNIA_INFRA }}
3450

3551
- name: Create Tag and Release
3652
uses: ncipollo/release-action@v1

0 commit comments

Comments
 (0)