Skip to content

Commit 504176c

Browse files
committed
fixes
1 parent 53d0df3 commit 504176c

File tree

5 files changed

+37
-59
lines changed

5 files changed

+37
-59
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ on:
33
release:
44
types: [prereleased, released]
55

6-
defaults:
7-
run:
8-
working-directory: intellij-aicoder
9-
106
jobs:
117
release:
128
name: Publish Plugin
@@ -15,46 +11,60 @@ jobs:
1511
contents: write
1612
pull-requests: write
1713
steps:
18-
- name: Free Disk Space
14+
- name: Maximize Build Space
1915
uses: jlumbroso/free-disk-space@main
2016
with:
2117
tool-cache: false
2218
large-packages: false
23-
19+
- name: Dump GitHub context
20+
env:
21+
GITHUB_CONTEXT: ${{ toJSON(github) }}
22+
run: echo "$GITHUB_CONTEXT"
23+
- name: Dump runner context
24+
env:
25+
RUNNER_CONTEXT: ${{ toJSON(runner) }}
26+
run: echo "$RUNNER_CONTEXT"
27+
- name: Configure Git
28+
run: |
29+
git config --global init.defaultBranch main
30+
git --version
31+
echo "Git configuration:"
32+
git config --list
2433
- name: Fetch Sources
2534
uses: actions/checkout@v4
2635
with:
27-
ref: ${{ github.event.release.tag_name }}
28-
36+
submodules: recursive
37+
- name: Gradle Wrapper Validation
38+
uses: gradle/actions/wrapper-validation@v3
39+
with:
40+
working-directory: intellij-aicoder
2941
- name: Setup Java
3042
uses: actions/setup-java@v4
3143
with:
3244
distribution: zulu
3345
java-version: 17
34-
46+
- name: Print Java version
47+
run: |
48+
java -version
49+
echo "JAVA_HOME=$JAVA_HOME"
3550
- name: Setup Gradle
3651
uses: gradle/actions/setup-gradle@v4
37-
38-
- name: Export Properties
39-
id: properties
40-
shell: bash
41-
run: |
42-
CHANGELOG="$(cat << 'EOM' | sed -e 's/^[[:space:]]*$//g' -e '/./,$!d'
43-
${{ github.event.release.body }}
44-
EOM
45-
)"
46-
47-
echo "changelog<<EOF" >> $GITHUB_OUTPUT
48-
echo "$CHANGELOG" >> $GITHUB_OUTPUT
49-
echo "EOF" >> $GITHUB_OUTPUT
52+
with:
53+
gradle-home-cache-cleanup: true
54+
- name: Make Gradle wrapper executable
55+
run: chmod +x ./gradlew
56+
- name: Print Gradle version
57+
working-directory: intellij-aicoder
58+
run: ../gradlew --version
5059

5160
- name: Publish Plugin
5261
env:
5362
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
5463
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
5564
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
5665
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
57-
run: ./gradlew publishPlugin -x test
66+
run: ../gradlew publishPlugin -x test
67+
working-directory: intellij-aicoder
5868

5969
- name: Upload Release Asset
6070
env:
@@ -64,35 +74,3 @@ jobs:
6474
for file in *; do
6575
gh release upload ${{ github.event.release.tag_name }} "$file"
6676
done
67-
68-
- name: Create Pull Request
69-
if: ${{ steps.properties.outputs.changelog != '' }}
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
run: |
73-
VERSION="${{ github.event.release.tag_name }}"
74-
BRANCH="changelog-update-$VERSION"
75-
LABEL="release changelog"
76-
77-
git config user.email "[email protected]"
78-
git config user.name "GitHub Action"
79-
80-
git checkout -b $BRANCH
81-
82-
# Ensure we're modifying the changelog in the correct module
83-
cd ${{ github.workspace }}/intellij-aicoder
84-
85-
git add CHANGELOG.md
86-
git commit -m "Changelog update - $VERSION"
87-
git push --set-upstream origin $BRANCH
88-
89-
gh label create "$LABEL" \
90-
--description "Pull requests with release changelog update" \
91-
--force \
92-
|| true
93-
94-
gh pr create \
95-
--title "Changelog update - \`$VERSION\`" \
96-
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
97-
--label "$LABEL" \
98-
--head $BRANCH

jo-penai

0 commit comments

Comments
 (0)