Skip to content

Commit

Permalink
ci: tag and release on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Uninen committed Jul 17, 2023
1 parent d7fa0ac commit 7dec778
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,35 @@ jobs:
- uses: JS-DevTools/npm-publish@v2
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/logger/blob/main/CHANGES.md
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

### 0.1.1 - N/A
### 0.1.2 - 2023-07-17

- CI: added automatic tagging and releases to GH actions.

### 0.1.1 - 2023-07-17

- Fix: type exports work properly now.
- Chore: bumped all deps.
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/logger",
"version": "0.1.1",
"version": "0.1.2",
"description": "Better console logging with TypScript support",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down

0 comments on commit 7dec778

Please sign in to comment.