Skip to content

Commit

Permalink
chore: create tags and releases on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Uninen committed Jul 17, 2023
1 parent d6c310d commit a9f44bc
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,39 @@ jobs:
pnpm build
- uses: JS-DevTools/npm-publish@v2
id: publish
with:
token: ${{ secrets.NPM_TOKEN }}

- name: Create Tag
if: ${{ steps.publish.outputs.type }}
id: create_tag
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./package.json

- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
if: steps.create_tag.outputs.successful
with:
head-ref: ${{steps.create_tag.outputs.version}}
filter-author: (Uninen|renovate-bot)
show-emoji: false

- name: Get the changelog
run: echo "${{ steps.changelog.outputs.changelog }}"

- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
body: |
${{ steps.changelog.outputs.changelog }}
Compare changes: ${{ steps.changelog.outputs.compareurl }}
Read more from the Changelog: https://github.com/slipmatio/toolbelt/blob/main/CHANGES.md
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.2 (2023-07-17)

- CI: create tags and releases on publish.

## 0.1.1 (2023-07-17)

- Fix: export types correctly.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slipmatio/toolbelt",
"version": "0.1.1",
"version": "0.1.2",
"main": "dist/toolbelt.js",
"module": "dist/toolbelt.mjs",
"exports": {
Expand Down

0 comments on commit a9f44bc

Please sign in to comment.