Skip to content

Commit

Permalink
ci(ci): 💚 Updated ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
itpropro committed Dec 18, 2022
1 parent 45ab827 commit b20e5b8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,19 @@ jobs:
with:
github_token: ${{ secrets.TREE_STRUCTURE_TS_PAT }}
release_branches: main

- name: Update package.json
shell: pwsh
env:
TAG_NAME: ${{ steps.tag_version.outputs.new_tag }}
run: |
$env:RELEASE_VERSION = $env:TAG_NAME.replace('v', '')
$content = Get-Content .\package.json
$content = $content | foreach-object { $_ -replace '(?<prefix>^.+"version": ")(.+)(?<suffix>",)$', "`${prefix}$env:RELEASE_VERSION`${suffix}" }
$content | foreach-object { [System.Text.RegularExpressions.Regex]::Unescape($_) } | Out-File .\package.json -Force -Encoding ascii
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "ci(package-json): :bookmark: Bumped package.json version to ${{ steps.tag_version.outputs.new_tag }}"
commit_user_email: jdamaschke@visorian.com
branch: main
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: release

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![npm (scoped)](https://img.shields.io/npm/v/@itpropro/tree-structure-ts)](https://www.npmjs.com/package/@itpropro/tree-structure-ts)
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@itpropro/tree-structure-ts)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/itpropro/tree-structure-ts/ci.yml?branch=main)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/itpropro/tree-structure-ts/release.yml?branch=main)
![Code Coverage](https://img.shields.io/badge/coverage->95%25-green)

## Introduction
Expand Down

0 comments on commit b20e5b8

Please sign in to comment.