From 06468918c3b0ac8e76b59178f187e42e3561dfbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Pereira=20Mu=C3=B1oz?= Date: Thu, 18 May 2023 14:52:22 +0200 Subject: [PATCH] Create a job to create releases --- .github/workflows/deploy.yaml | 58 ++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e549338..3aea43e 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -24,4 +24,60 @@ jobs: yarn install --frozen-lockfile --ignore-scripts --prefer-offline npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Build Changelog + id: build_changelog + uses: mikepenz/release-changelog-builder-action@v3 + with: + configurationJson: | + { + "categories": [ + { + "title": "## 🚀 Features", + "labels": ["feature", "enhancement", "request"] + }, + { + "title": "## 🛠 Fixes", + "labels": ["fix", "bug"] + }, + { + "title": "## 🎲 Demo", + "labels": ["demo"] + }, + { + "title": "## 🧩 Dependencies", + "labels": ["dependencies"] + }, + { + "title": "## ⚙️ Configuration", + "labels": ["configuration"] + }, + { + "title": "## 📦 Other", + "labels": [] + } + ], + "template": "#{{CHANGELOG}}", + "pr_template": "- #{{TITLE}}\n - PR: ##{{NUMBER}} by @#{{AUTHOR}}", + "empty_template": "#{{OWNER}}\n#{{REPO}}\n#{{FROM_TAG}}\n#{{TO_TAG}}", + "max_pull_requests": 1000, + "max_back_track_time_days": 1000, + "label_extractor": [ + { + "pattern": "^fix", + "on_property": "title", + "method": "match", + "flags": "i" + } + ] + } + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create a release + uses: softprops/action-gh-release@v1 + with: + files: | + esm/index.js + index.d.ts + body: | + ${{ steps.build_changelog.outputs.changelog }} \ No newline at end of file