Skip to content

Commit

Permalink
Configure project release
Browse files Browse the repository at this point in the history
  • Loading branch information
jairhenrique committed Jun 14, 2023
1 parent 571a3e9 commit 337a51b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 26 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags:
- "*"
permissions:
contents: write
packages: read

jobs:
npm-publish:
Expand All @@ -16,6 +19,7 @@ jobs:
- run: npm install
- run: npm run lint
- run: npm test

- id: "publish"
uses: JS-DevTools/npm-publish@v1
with:
Expand All @@ -28,3 +32,14 @@ jobs:
- if: steps.publish.type == 'none'
run: |
echo "Version not changed."
- name: Get current tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Generate release changelog
run: ./src/cli/index.js preview -p $RELEASE_VERSION >> release.txt

- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: release.txt
58 changes: 33 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cli/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { newsFragmentsUserConfig } from "../config.js";
import { getChangelogContent, getFragments } from "../file.js";

marked.setOptions({
renderer: new TerminalRenderer(),
renderer: new TerminalRenderer({ tab: 0 }),
mangle: false,
headerIds: false,
});
Expand Down

0 comments on commit 337a51b

Please sign in to comment.