40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: "Create Release"
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
|
|
jobs:
|
|
changelog:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkouts repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup NodeJS
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22.x"
|
|
|
|
- name: Install deps
|
|
run: npm i
|
|
|
|
- name: Conventional changelog action
|
|
id: changelog
|
|
uses: TriPSs/conventional-changelog-action@v5
|
|
with:
|
|
skip-on-empty: false
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Create release
|
|
if: ${{ steps.changelog.outputs.skipped == 'false' }}
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
generateReleaseNotes: true
|
|
token: ${{ secrets.CHANGELOG_SECRET }}
|
|
tag: ${{ steps.changelog.outputs.tag }}
|
|
name: ${{ steps.changelog.outputs.tag }}
|
|
body: ${{ steps.changelog.outputs.clean_changelog }}
|
|
|
|
- name: Fix identation in package.json
|
|
run: prettier --write package.json |