Skip to content

Release 1.5.3

Release 1.5.3 #73

Workflow file for this run

name: Release, IntelliJ-Haxe-plugin
on:
push:
tags:
- "release-[0-9]+.[0-9]+.[0-9]+**" # trigger on tags that matches version numbers ex. 1.3.10
jobs:
prepare:
name: Create release draft
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
id: ${{ steps.create_release.outputs.id }}
steps:
- uses: actions/checkout@v3
- name: shorten Changelog
id: shortlog
run: |
sed -b -e '/^\r\?$/,$d' CHANGELOG.md >> shortlog.txt
- name: read Changelog
id: changelog
uses: juliangruber/read-file-action@v1
with:
path: ./shortlog.txt
- name: Get short SHA
id: short_sha
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.changelog.outputs.content }}
draft: true
prerelease: false
build:
name: Build and upload artifacts
strategy:
fail-fast: true # cancel all builds if one fails.
matrix:
IDEA_VERSION: [ 2024.1 ]
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
architecture: x64
- name: Set up Haxe
uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.3.0
- name: Test haxe
run: haxe -version
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Cache intelliJ downloads
uses: actions/cache@v3
with:
path: $GITHUB_WORKSPACE/idea
key: ${{ matrix.IDEA_VERSION }}-idea-${{ hashFiles('ideaIU-${{ matrix.IDEA_VERSION }}/**') }}
restore-keys: ${{ matrix.IDEA_VERSION }}-idea
- name: Build with Gradle
run: ./gradlew clean test buildPlugin verifyPlugin
- name: Find assets
id: find_assets
run: |
ARTIFACT_PATHNAME=$(ls *.zip | head -n 1)
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME)
echo artifact_name=${ARTIFACT_NAME} >> $GITHUB_OUTPUT
echo artifact_pathname=${ARTIFACT_PATHNAME} >> $GITHUB_OUTPUT
- name: Upload Asset
id: upload-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare.outputs.upload_url }}
asset_path: ${{ steps.find_assets.outputs.artifact_pathname }}
asset_name: intellij-haxe-${{ matrix.IDEA_VERSION }}.zip
asset_content_type: application/java-archive
finish:
name: publish release
needs: [prepare, build]
runs-on: ubuntu-latest
steps:
- name: Publish release
uses: StuYarrow/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ needs.prepare.outputs.id }}