Skip to content

Commit 6178558

Browse files
committed
IJMP-1587 Preparing release.yml
Signed-off-by: Uladzislau <[email protected]>
1 parent a39142b commit 6178558

File tree

2 files changed

+102
-70
lines changed

2 files changed

+102
-70
lines changed

.github/workflows/build.yml

+47-33
Original file line numberDiff line numberDiff line change
@@ -46,39 +46,53 @@ jobs:
4646
shell: bash
4747
run: pwd && ls -la
4848

49-
# - name: Fetch Gradle properties
50-
# id: properties
51-
# env:
52-
# AUTO_SNAPSHOT_VERSION: false
53-
# shell: bash
54-
# run: |
55-
# PROPERTIES="$(./gradlew properties --console=plain -q)"
56-
57-
# echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
58-
59-
# # prepare list of IDEs to use by plugin verifier:
60-
# ./gradlew listProductsReleases
61-
62-
# - name: Build plugin
63-
# shell: bash
64-
# run: ./gradlew buildPlugin
65-
66-
# - name: Prepare Plugin Artifact
67-
# id: artifact
68-
# shell: bash
69-
# run: |
70-
# cd ${{ github.workspace }}/build/distributions
71-
# FILENAME=`ls *.zip`
72-
# unzip "$FILENAME" -d content
73-
# echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
74-
# echo "zip artifact name:"
75-
# echo "$FILENAME"
76-
77-
# - name: Publish built plugin to artifacts
78-
# uses: actions/upload-artifact@v4
79-
# with:
80-
# name: ${{ steps.artifact.outputs.filename }}
81-
# path: ./build/distributions/content/*/*
49+
- name: Fetch Gradle properties
50+
id: properties
51+
env:
52+
AUTO_SNAPSHOT_VERSION: false
53+
shell: bash
54+
run: |
55+
PROPERTIES="$(./gradlew properties --console=plain -q)"
56+
CHANGELOG="$(cat << 'EOM' | ./gradlew getChangelog -q
57+
EOM
58+
)"
59+
60+
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
61+
62+
echo 'changelog<<EOF' >> $GITHUB_OUTPUT
63+
echo "$CHANGELOG" >> $GITHUB_OUTPUT
64+
echo 'EOF' >> $GITHUB_OUTPUT
65+
66+
echo "$CHANGELOG"
67+
68+
# prepare list of IDEs to use by plugin verifier:
69+
./gradlew listProductsReleases
70+
71+
# TODO: remove
72+
- name: Build plugin
73+
shell: bash
74+
run: exit 1
75+
76+
- name: Build plugin
77+
shell: bash
78+
run: ./gradlew buildPlugin
79+
80+
- name: Prepare Plugin Artifact
81+
id: artifact
82+
shell: bash
83+
run: |
84+
cd ${{ github.workspace }}/build/distributions
85+
FILENAME=`ls *.zip`
86+
unzip "$FILENAME" -d content
87+
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
88+
echo "zip artifact name:"
89+
echo "$FILENAME"
90+
91+
- name: Publish built plugin to artifacts
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: ${{ steps.artifact.outputs.filename }}
95+
path: ./build/distributions/content/*/*
8296

8397
# test:
8498
# needs: [build]

.github/workflows/release.yml

+55-37
Original file line numberDiff line numberDiff line change
@@ -53,51 +53,69 @@ jobs:
5353
echo "pluginVersionFull=$PLUGIN_VERSION_FULL" >> $GITHUB_OUTPUT
5454
echo "pluginVersionSemVer=$PLUGIN_VERSION_SEMVER" >> $GITHUB_OUTPUT
5555
56-
- name: Publish Plugin
57-
env:
58-
INTELLIJ_SIGNING_PUBLISH_TOKEN: ${{ secrets.INTELLIJ_SIGNING_PUBLISH_TOKEN }}
59-
INTELLIJ_SIGNING_CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_SIGNING_CERTIFICATE_CHAIN }}
60-
INTELLIJ_SIGNING_PRIVATE_KEY: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY }}
61-
INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD }}
62-
run: ./gradlew publishPlugin
56+
# - name: Publish Plugin
57+
# env:
58+
# INTELLIJ_SIGNING_PUBLISH_TOKEN: ${{ secrets.INTELLIJ_SIGNING_PUBLISH_TOKEN }}
59+
# INTELLIJ_SIGNING_CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_SIGNING_CERTIFICATE_CHAIN }}
60+
# INTELLIJ_SIGNING_PRIVATE_KEY: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY }}
61+
# INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD }}
62+
# run: ./gradlew publishPlugin
6363

6464
- name: Create new tag and release
6565
env:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6767
run: gh release create ${{ steps.properties.outputs.pluginVersionFull }} -F CHANGELOG.md
6868

69-
- name: Create Pull Request
69+
- name: Upload Release Built Artifact
70+
continue-on-error: true
7071
env:
7172
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
run: |
73-
VERSION="${{ github.event.release.tag_name }}"
74-
BRANCH="release-changelog-update-$VERSION"
75-
LABEL="CHANGELOG.md updates on release"
76-
77-
git config user.email "[email protected]"
78-
git config user.name "GitHub Action"
79-
80-
git checkout -b $BRANCH
81-
git commit -am ":rocket: ${VERSION}" -m "[skip ci]"
82-
git push --set-upstream origin $BRANCH
83-
84-
gh label create "$LABEL" \
85-
--color B39DDB \
86-
--description "Pull requests with release changelog update" \
87-
|| true
88-
89-
gh pr create \
90-
--title ":rocket: \`$VERSION\`" \
91-
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
92-
--base "${{ github.event.release.target_commitish }}" \
93-
--label "$LABEL" \
94-
--head $BRANCH
95-
96-
- name: Close Milestone
73+
run: gh release upload ${{ steps.properties.outputs.pluginVersionFull }} ./build/distributions/*
74+
75+
- name: Upload Release Verification Results
9776
continue-on-error: true
9877
env:
9978
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100-
run: |
101-
gh api repos/{owner}/{repo}/milestones \
102-
--jq '.[] | select(.title == "${{ steps.properties.outputs.pluginVersionSemVer }}") | .number' \
103-
| xargs -I '{}' gh api -X PATCH repos/{owner}/{repo}/milestones/{} -F state='closed'
79+
run: gh release upload ${{ steps.properties.outputs.pluginVersionFull }} ./build/reports/pluginVerifier/*
80+
81+
- name: Upload Release Tests Results
82+
continue-on-error: true
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
run: gh release upload ${{ steps.properties.outputs.pluginVersionFull }} ./build/reports/kover/html/*
86+
87+
# - name: Create Pull Request
88+
# env:
89+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
# run: |
91+
# VERSION="${{ steps.properties.outputs.pluginVersionFull }}"
92+
# BRANCH="release-changelog-update-$VERSION"
93+
# LABEL="release-closer"
94+
95+
# git config user.email "[email protected]"
96+
# git config user.name "GitHub Action"
97+
98+
# git checkout -b $BRANCH
99+
# git commit -am ":moai: ${VERSION}" -m "[skip ci]"
100+
# git push --set-upstream origin $BRANCH
101+
102+
# gh label create "$LABEL" \
103+
# --color FFEF00 \
104+
# --description "Pull requests with release changelog update" \
105+
# || true
106+
107+
# gh pr create \
108+
# --title ":moai: \`$VERSION\`" \
109+
# --body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
110+
# --base "${{ github.event.release.target_commitish }}" \
111+
# --label "$LABEL" \
112+
# --head $BRANCH
113+
114+
# - name: Close Milestone
115+
# continue-on-error: true
116+
# env:
117+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118+
# run: |
119+
# gh api repos/{owner}/{repo}/milestones \
120+
# --jq '.[] | select(.title == "${{ steps.properties.outputs.pluginVersionSemVer }}") | .number' \
121+
# | xargs -I '{}' gh api -X PATCH repos/{owner}/{repo}/milestones/{} -F state='closed'

0 commit comments

Comments
 (0)