Skip to content

build: bump version to 3.2.3 #18

build: bump version to 3.2.3

build: bump version to 3.2.3 #18

Workflow file for this run

# Workflow Description:
# - Patches the `CHANGELOG.md` into the `.jar` for updated release notes
# - Builds the `.jar`
# - Publishes to the JetBrains Marketplace
# - Creates a draft release on GitHub for maintainers with the new `.jar` to manually review and release
name: Publish
on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
env:
DENO_DIR: deno_cache
jobs:
build:
name: Publish Plugin
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
cache: 'gradle'
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Cache Deno
uses: actions/cache@v3
with:
key: ${{ hashFiles('generateFlavours/lock.json') }}
path: ${{ env.DENO_DIR }}
- name: Export Properties
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
echo "version=$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" >> $GITHUB_ENV
echo "name=$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')" >> $GITHUB_ENV
- name: Generate All Flavours
run: ./generateFlavours/main.ts
- name: Patch Changelog
run: ./gradlew patchChangelog
- name: Build Plugin
run: ./gradlew buildPlugin
- name: Upload JAR
uses: actions/upload-artifact@v3
with:
name: ${{ env.name }}-${{ env.version }}.jar
path: build/libs/*.jar
# Notes on Script Hardening: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections
- name: Output Release Notes
run: |
echo "# 🚀 Tagged Release 🚀" >> $GITHUB_STEP_SUMMARY
RELEASE_NOTES="$(./gradlew getChangelog --console=plain -q)"
DELIMITER="$(openssl rand -hex 8)"
echo "release_notes<<$DELIMITER" >> $GITHUB_ENV
echo "$RELEASE_NOTES" >> $GITHUB_ENV
echo "$DELIMITER" >> $GITHUB_ENV
echo "$RELEASE_NOTES" >> $GITHUB_STEP_SUMMARY
- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_MARKETPLACE_TOKEN }}
run: ./gradlew publishPlugin
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: build/libs/*.jar
body: ${{ env.release_notes }}
draft: true
- name: Commit Release Notes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "docs: update changelog"
branch: main
file_pattern: CHANGELOG.md