Skip to content
Merged
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
61 changes: 54 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,57 @@ on:

jobs:

# Build every variant and attach its ZIP to the release
assets:
name: Release Asset (${{ matrix.phpApi }})
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- { phpApi: 252, buildDir: build }
- { phpApi: 262, buildDir: build }
- { phpApi: openide, buildDir: build/openide }
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v2.0.0
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v7
with:
ref: ${{ github.event.release.tag_name }}

# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v6
with:
distribution: zulu
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6.4.0
with:
cache-read-only: true

# Build plugin
- name: Build plugin
run: ./gradlew buildPlugin -PphpApi=${{ matrix.phpApi }}

# Upload the plugin archive as a release asset
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./${{ matrix.buildDir }}/distributions/*.zip --clobber

# Prepare and publish the plugin to JetBrains Marketplace repository
release:
name: Publish Plugin
Expand Down Expand Up @@ -66,15 +117,9 @@ jobs:
# publishPlugin releases every variant listed in `phpApis`; the Marketplace serves each IDE its match.
run: ./gradlew publishPlugin

# Upload an artifact as a release asset
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*

# Create a pull request
- name: Create Pull Request
if: ${{ steps.properties.outputs.changelog != '' }}
if: ${{ github.event.release.body != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -85,6 +130,8 @@ jobs:
git config user.email "action@github.com"
git config user.name "GitHub Action"

git diff --quiet CHANGELOG.md && exit 0

git checkout -b $BRANCH
git commit -am "Changelog update - $VERSION"
git push --set-upstream origin $BRANCH
Expand Down
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,8 @@ tested without the platform fixture.

- **build.yml** (push to `main`, all PRs): `buildPlugin` β†’ `check` (Kover XML β†’ Codecov) β†’ Qodana β†’
`verifyPlugin` β†’ release draft. Runs on `ubuntu-latest`, Java 21 (Zulu), free-disk-space step first.
- **release.yml** (on GitHub release): publish to JetBrains Marketplace, patch the changelog, open a PR back.
- **release.yml** (on GitHub release): publish to JetBrains Marketplace, patch the changelog, open a PR back;
a matrix builds 252, 262 and `openide` and attaches each ZIP to the release.
- **run-ui-tests.yml** (manual): UI tests on Ubuntu / Windows / macOS via robot-server.

## Conventions
Expand Down
Loading