Skip to content

Commit

Permalink
create npm script for tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
mki-c2c committed Aug 8, 2024
1 parent 84ad63f commit c1576cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ The results of the build can be found in the folder `bundle`

An automatic mecanism has been created with github actions. This workflow is triggered when a tag is pushed into the repo.

For the moment there is no automatic tag generation on pull requests, so for dev, the following naming conventions are recommended:
For dev releases, create a new tag, the CI will then generate the release. The following naming conventions are recommended:
<branch_name>\_TAG\_<short_commit>

an npm script is included in package.json, so just call

```
echo $(git rev-parse --abbrev-ref HEAD)_tag_$(git rev-parse --short HEAD)
npm run tag
git push --tags
```

The CI automatically builds the lib, creates a release named after the tag and includes the built bundle in the release. The built package can then be downloaded at the URL:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0-dev",
"private": true,
"scripts": {
"tag": "git tag $(git rev-parse --abbrev-ref HEAD)_TAG_$(git rev-parse --short HEAD)",
"start": "npm run dev",
"dev": "vite --force",
"build": "run-p type-check build-only",
Expand Down

0 comments on commit c1576cd

Please sign in to comment.