Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build HTML-Attribute-Folder

runs:
using: "composite"
steps:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: ${{ inputs.java_version }}
cache: 'gradle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build PlugIn
shell: bash
run: ./gradlew buildPlugin

- name: Tests and Verify Plugin
shell: bash
run: ./gradlew verifyPlugin check

- name: Release PlugIn
uses: ncipollo/release-action@v1
with:
token: ${{ inputs.github_token }}
artifacts: "build/distributions/html-attribute-folder-*.zip"
name: "html-attribute-folder-${{ inputs.version }}.zip"
tag: "v${{ inputs.version }}"
allowUpdates: true

inputs:
github_token:
description: Access Token for GitHub
required: true
version:
description: Version of the Release
required: true
java_version:
description: Java version to use
required: false
default: "21"
41 changes: 41 additions & 0 deletions .github/workflows/buildRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Release HTML-Attribute-Folder
on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout project sources
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ github.ref }}

- name: Get the version
id: versions
run: echo "TAGGED_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Get branch data
uses: tj-actions/branch-names@v7
id: branches

# For debugging purposes
- name: Debug
shell: bash
run: |
echo "Version: ${{ steps.versions.outputs.TAGGED_VERSION }}"
echo "Branch : ${{ steps.branches.outputs.base_ref_branch || steps.branches.outputs.current_branch }}"

- name: Build and Release
uses: ./.github/actions/build
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.versions.outputs.TAGGED_VERSION }}

# TODO Release projekt at IntelliJ's Marketplace
Loading