Skip to content

Commit a9f44bc

Browse files
committed
chore: create tags and releases on publish
1 parent d6c310d commit a9f44bc

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.github/workflows/release.yml

+34
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,39 @@ jobs:
2121
pnpm build
2222
2323
- uses: JS-DevTools/npm-publish@v2
24+
id: publish
2425
with:
2526
token: ${{ secrets.NPM_TOKEN }}
27+
28+
- name: Create Tag
29+
if: ${{ steps.publish.outputs.type }}
30+
id: create_tag
31+
uses: jaywcjlove/create-tag-action@main
32+
with:
33+
package-path: ./package.json
34+
35+
- name: Generate Changelog
36+
id: changelog
37+
uses: jaywcjlove/changelog-generator@main
38+
if: steps.create_tag.outputs.successful
39+
with:
40+
head-ref: ${{steps.create_tag.outputs.version}}
41+
filter-author: (Uninen|renovate-bot)
42+
show-emoji: false
43+
44+
- name: Get the changelog
45+
run: echo "${{ steps.changelog.outputs.changelog }}"
46+
47+
- name: Create Release
48+
uses: ncipollo/release-action@v1
49+
if: steps.create_tag.outputs.successful
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
name: ${{ steps.create_tag.outputs.version }}
53+
tag: ${{ steps.create_tag.outputs.version }}
54+
body: |
55+
${{ steps.changelog.outputs.changelog }}
56+
57+
Compare changes: ${{ steps.changelog.outputs.compareurl }}
58+
59+
Read more from the Changelog: https://github.com/slipmatio/toolbelt/blob/main/CHANGES.md

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.1.2 (2023-07-17)
4+
5+
- CI: create tags and releases on publish.
6+
37
## 0.1.1 (2023-07-17)
48

59
- Fix: export types correctly.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@slipmatio/toolbelt",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"main": "dist/toolbelt.js",
55
"module": "dist/toolbelt.mjs",
66
"exports": {

0 commit comments

Comments
 (0)