Skip to content

Commit f577be4

Browse files
committed
chore: Generate changelog automatically
chore: Generate changelog automatically fix(changelog): Add tag on changelog too
1 parent 1fd686a commit f577be4

File tree

5 files changed

+114
-24
lines changed

5 files changed

+114
-24
lines changed

.github/actions/build/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build HTML-Attribute-Folder
2+
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Setup Java
7+
uses: actions/setup-java@v4
8+
with:
9+
distribution: 'oracle'
10+
java-version: ${{ inputs.java_version }}
11+
12+
- name: Setup Gradle
13+
uses: gradle/actions/setup-gradle@v4
14+
15+
- name: Build PlugIn
16+
shell: bash
17+
run: ./gradlew buildPlugin
18+
19+
- name: Release PlugIn
20+
uses: ncipollo/release-action@v1
21+
with:
22+
token: ${{ inputs.github_token }}
23+
artifacts: "build/distributions/html-attribute-folder-*.zip"
24+
name: "html-attribute-folder-${{ inputs.version }}.zip"
25+
26+
inputs:
27+
github_token:
28+
description: Access Token for GitHub
29+
required: true
30+
version:
31+
description: Version of the Release
32+
required: true
33+
java_version:
34+
description: Java version to use
35+
required: false
36+
default: "21"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Generate HTML-Attribute-Changelog
2+
3+
runs:
4+
using: "composite"
5+
steps:
6+
- uses: BobAnkh/auto-generate-changelog@v1.2.5
7+
with:
8+
ACCESS_TOKEN: ${{ inputs.github_token }}
9+
COMMIT_MESSAGE: "docs(changelog): 📚 Update release notes for ${{ inputs.version }}"
10+
TYPE: "feat:Feature,fix:Fixes,docs:Documentation"
11+
BRANCH: ${{ inputs.branch_name }}
12+
SUPPRESS_UNSCOPED: "true"
13+
REPLACE_EMPTY_RELEASE_INFO: ""
14+
15+
inputs:
16+
github_token:
17+
description: Access Token for GitHub
18+
required: true
19+
version:
20+
description: Version of the Release
21+
required: true
22+
branch_name:
23+
description: Name of the branch
24+
required: true

.github/workflows/buildRelease.yml

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,60 @@
1-
name: Build HTML-Attribute-Folder
1+
name: Build and Release HTML-Attribute-Folder
22
on:
33
push:
44
tags:
55
- 'v*'
6+
67
jobs:
7-
build-gradle-project:
8+
build:
89
runs-on: ubuntu-latest
910
permissions:
1011
contents: write
1112
steps:
13+
- name: Checkout project sources
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
fetch-tags: true
18+
ref: ${{ github.ref }}
19+
1220
- name: Get the version
13-
id: get_version
21+
id: versions
1422
run: echo "TAGGED_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
15-
- name: Checkout project sources
23+
24+
- name: Get branch data
25+
uses: tj-actions/branch-names@v7
26+
id: branches
27+
28+
- name: Debug
29+
shell: bash
30+
run: |
31+
echo "Version: ${{ steps.versions.outputs.TAGGED_VERSION }}"
32+
echo "Branch : ${{ steps.branches.outputs.base_ref_branch || steps.branches.outputs.current_branch }}"
33+
34+
- name: Build and Release
35+
uses: ./.github/actions/build
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
version: ${{ steps.versions.outputs.TAGGED_VERSION }}
39+
40+
- name: Create changelog
41+
uses: ./.github/actions/changelog
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
version: ${{ steps.versions.outputs.TAGGED_VERSION }}
45+
branch_name: ${{ steps.branches.outputs.base_ref_branch || steps.branches.outputs.current_branch }}
46+
47+
# After creating the changelog, check out the latest changes to
48+
# set the tag correctly and on the CHANGELOG.md too
49+
- name: Checkout latest changes
1650
uses: actions/checkout@v4
17-
- name: Setup Java
18-
uses: actions/setup-java@v4
1951
with:
20-
distribution: 'oracle'
21-
java-version: 17
22-
- name: Setup Gradle
23-
uses: gradle/actions/setup-gradle@v4
24-
- name: Build PlugIn
25-
run: ./gradlew buildPlugin
26-
- name: Release PlugIn
27-
uses: ncipollo/release-action@v1
52+
fetch-depth: 0
53+
ref: ${{ steps.branches.outputs.base_ref_branch || steps.branches.outputs.current_branch }}
54+
55+
- name: Update tag
56+
uses: rickstaa/action-create-tag@v1
2857
with:
29-
token: ${{ secrets.GITHUB_TOKEN }}
30-
artifacts: "build/distributions/html-attribute-folder-*.zip"
31-
name: "html-attribute-folder-${{ steps.get_version.outputs.TAGGED_VERSION }}.zip"
58+
tag: "v${{ steps.versions.outputs.TAGGED_VERSION }}"
59+
message: "Release ${{ steps.versions.outputs.TAGGED_VERSION }}"
60+
force_push_tag: "true"

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
Annoyed with some html attributes and their length?
66

7-
This simple and lightweight plugin will help you fold them, so you don't need to see them anymore. Any
8-
template written in JSX, XML, HTML, XHTML and DTD is supported by the plugin. The plugin will not edit your real code in any way, and you can choose whether
9-
to fold
10-
the items by default, placeholder for folded items, and how the folding looks like.
7+
This simple and lightweight plugin will help you fold them, so you don't need to see them anymore. Any template written in RHTML (Ruby HTML), ERB (Embedded
8+
Ruby), JSX, XML, HTML, XHTML and DTD is supported by the plugin. The plugin will not edit your real code in any way, and you can choose whether
9+
to fold the items by default, placeholder for folded items, and how the folding looks like.
1110

1211
You can find the plugin on [IntelliJ marketplace](https://plugins.jetbrains.com/plugin/19715-html-attribute-folder).
1312

src/main/resources/META-INF/plugin.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-description -->
1818
<description><![CDATA[
1919
Annoyed with some html attributes and their length?
20+
2021
This simple and lightweight plugin will help you fold them, so you don't need to see them anymore.
21-
Any template written in JSX, XML, HTML, XHTML and DTD is supported by the plugin.
22-
The plugin will not edit your real code in any way, and you can choose
23-
whether to fold the items by default, placeholder for folded items, and how the folding looks like.
22+
Any template written in RHTML (Ruby HTML), ERB (Embedded Ruby), JSX, XML, HTML, XHTML and DTD is supported by the
23+
plugin. The plugin will not edit your real code in any way, and you can choose whether to fold the items by default,
24+
placeholder for folded items, and how the folding looks like.
2425
]]></description>
2526

2627
<!-- Product and plugin compatibility requirements.
@@ -42,6 +43,7 @@
4243
<lang.foldingBuilder language="TypeScript JSX" implementationClass="dev.zbinski.htmlattributefolder.AttributeFolder"/>
4344
<lang.foldingBuilder language="JavaScript" implementationClass="dev.zbinski.htmlattributefolder.AttributeFolder"/>
4445
<lang.foldingBuilder language="JavaScript JSX" implementationClass="dev.zbinski.htmlattributefolder.AttributeFolder"/>
46+
<lang.foldingBuilder language="RHTML" implementationClass="dev.zbinski.htmlattributefolder.AttributeFolder"/>
4547

4648
<projectConfigurable parentId="tools"
4749
nonDefaultProject="true"

0 commit comments

Comments
 (0)