Skip to content

Commit

Permalink
💚 Fix CI :
Browse files Browse the repository at this point in the history
- Add scripts property to package.json
- Remove useless mingjun97/file-regex-replace@v1 and replace it by npm version command
  • Loading branch information
clementdejoie committed Nov 29, 2023
1 parent cbbc63d commit 6d8431f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/publish-npm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [created]

jobs:
build:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -18,11 +18,7 @@ jobs:
scope: '@zerogachis'

- name: Update package version
uses: mingjun97/file-regex-replace@v1
with:
regex: '"version": "([0-9.]*)"'
replacement: '"version": "${{ github.ref_name }}"'
include: 'package.json'
run: npm version --no-git-tag-version ${{ github.ref_name }}

- name: Publish
if: startsWith(github.ref, 'refs/tags/')
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "@zerogachis/smartway-design-token",
"version": "0.0.0",
"version": "0.0.1",
"description": "Smartway design tokens",
"main": "tokens.json",
"scripts": {
"test": "echo \"Test\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ZeroGachis/smartway-design-token.git"
Expand Down

0 comments on commit 6d8431f

Please sign in to comment.