Skip to content

Commit 094b0d0

Browse files
committed
IJMP-1844 Release preparations (#16)
Signed-off-by: Uladzislau <leksilonchikk@gmail.com>
1 parent b3bdc25 commit 094b0d0

27 files changed

+545
-163
lines changed

.github/workflows/build.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: Build
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout the plugin GitHub repository
10+
uses: actions/checkout@v4
11+
12+
- name: Setup Java
13+
uses: actions/setup-java@v4
14+
with:
15+
distribution: zulu
16+
java-version: 17
17+
18+
- name: Setup Gradle
19+
uses: gradle/actions/setup-gradle@v3
20+
with:
21+
gradle-home-cache-cleanup: true
22+
23+
- name: Prepare Products Releases
24+
env:
25+
AUTO_SNAPSHOT_VERSION: false
26+
PRODUCT_NAME: ${{ matrix.product }}
27+
shell: bash
28+
run: |
29+
PROPERTIES="$(./gradlew properties --console=plain -q)"
30+
31+
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
32+
33+
# prepare list of IDEs to use by plugin verifier:
34+
./gradlew listProductsReleases
35+
36+
- name: Check repository content
37+
shell: bash
38+
run: pwd && ls -la
39+
40+
- name: Build plugin's binary
41+
shell: bash
42+
run: ./gradlew build
43+
44+
- name: Prepare Plugin Artifact
45+
id: artifact
46+
shell: bash
47+
run: |
48+
cd ${{ github.workspace }}/build/distributions
49+
FILENAME=`ls *.zip`
50+
unzip "$FILENAME" -d content
51+
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
52+
echo "zip artifact name:"
53+
echo "$FILENAME"
54+
55+
- name: Publish built plugin to artifacts
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: ${{ steps.artifact.outputs.filename }}
59+
path: ./build/distributions/content/*/*
60+
test:
61+
needs: [build]
62+
runs-on: ubuntu-latest
63+
steps:
64+
65+
- name: Checkout the plugin GitHub repository
66+
uses: actions/checkout@v4
67+
68+
- name: Setup Java
69+
uses: actions/setup-java@v4
70+
with:
71+
distribution: zulu
72+
java-version: 17
73+
74+
- name: Setup Gradle
75+
uses: gradle/actions/setup-gradle@v3
76+
with:
77+
gradle-home-cache-cleanup: true
78+
79+
- name: Run tests
80+
shell: bash
81+
run: ./gradlew test
82+
83+
- name: Publish tests result to artifacts
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: tests-report
87+
path: ${{ github.workspace }}/build/reports/tests
88+
89+
- name: Publish code coverage report to artifacts
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: code-coverage-report
93+
path: ${{ github.workspace }}/build/reports/kover/html
94+
95+
verify:
96+
if: ${{ contains(github.ref, 'refs/heads/release/') }}
97+
needs: [build]
98+
runs-on: ubuntu-latest
99+
steps:
100+
101+
- name: Maximize Build Space
102+
uses: jlumbroso/free-disk-space@main
103+
with:
104+
tool-cache: false
105+
large-packages: false
106+
107+
- name: Checkout the plugin GitHub repository
108+
uses: actions/checkout@v4
109+
110+
- name: Setup Java
111+
uses: actions/setup-java@v4
112+
with:
113+
distribution: zulu
114+
java-version: 17
115+
116+
- name: Setup Gradle
117+
uses: gradle/actions/setup-gradle@v3
118+
with:
119+
gradle-home-cache-cleanup: true
120+
121+
- name: Setup Plugin Verifier IDEs Cache
122+
uses: actions/cache@v4
123+
with:
124+
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
125+
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
126+
127+
- name: Verify plugin against IntelliJ IDEA IDE's
128+
continue-on-error: true
129+
shell: bash
130+
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
131+
132+
- name: Collect Plugin Verifier Result
133+
uses: actions/upload-artifact@v4
134+
with:
135+
name: plugin-verifier-report
136+
path: ${{ github.workspace }}/build/reports/pluginVerifier

.github/workflows/release.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
steps:
13+
14+
- name: Checkout the plugin GitHub repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Java
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: zulu
21+
java-version: 17
22+
23+
- name: Setup Gradle
24+
uses: gradle/actions/setup-gradle@v3
25+
with:
26+
gradle-home-cache-cleanup: true
27+
28+
- name: Fetch Gradle properties
29+
id: properties
30+
shell: bash
31+
run: |
32+
PROPERTIES="$(./gradlew properties --console=plain -q)"
33+
PLUGIN_VERSION_FULL="$(echo "$PROPERTIES" | grep "^pluginVersion:" | cut -f2- -d ' ')"
34+
CURR_COMMIT="$(git rev-parse HEAD)"
35+
36+
echo "pluginVersionFull: $PLUGIN_VERSION_FULL"
37+
echo "currCommit: $CURR_COMMIT"
38+
39+
echo "pluginVersionFull=$PLUGIN_VERSION_FULL" >> $GITHUB_OUTPUT
40+
echo "currCommit=$CURR_COMMIT" >> $GITHUB_OUTPUT
41+
42+
- name: Publish Plugin
43+
env:
44+
ZOWE_INTELLIJ_MARKET_TOKEN: ${{ secrets.ZOWE_INTELLIJ_MARKET_TOKEN }}
45+
INTELLIJ_SIGNING_CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_SIGNING_CERTIFICATE_CHAIN }}
46+
INTELLIJ_SIGNING_PRIVATE_KEY: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY }}
47+
INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD }}
48+
run: ./gradlew publishPlugin
49+
50+
- name: Prepare release notes
51+
id: release_notes
52+
shell: bash
53+
run: |
54+
CHANGELOG="$(./gradlew getChangelog -q)"
55+
56+
echo 'version_release_notes<<EOF' >> $GITHUB_OUTPUT
57+
echo "$CHANGELOG" >> $GITHUB_OUTPUT
58+
echo 'EOF' >> $GITHUB_OUTPUT
59+
60+
echo "Release notes to be added:"
61+
echo "$CHANGELOG"
62+
63+
- name: Create new tag and release
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
run: |
67+
git tag ${{ steps.properties.outputs.pluginVersionFull }}
68+
git push origin ${{ steps.properties.outputs.pluginVersionFull }}
69+
gh release create ${{ steps.properties.outputs.pluginVersionFull }} --title ${{ steps.properties.outputs.pluginVersionFull }} --target ${{ steps.properties.outputs.currCommit }} -F- <<EOF
70+
${{ steps.release_notes.outputs.version_release_notes }}
71+
EOF
72+
73+
- name: Upload Release Built Artifact
74+
continue-on-error: true
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
run: gh release upload ${{ steps.properties.outputs.pluginVersionFull }} ./build/distributions/*
78+
79+
- name: Create Pull Request
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
run: |
83+
VERSION="${{ steps.properties.outputs.pluginVersionFull }}"
84+
BRANCH="release-changelog-update-$VERSION"
85+
86+
git config user.email "action@github.com"
87+
git config user.name "GitHub Action"
88+
89+
git checkout -b $BRANCH
90+
git commit -am ":moyai: ${VERSION}" -m "[skip ci]"
91+
git push --set-upstream origin $BRANCH
92+
93+
gh pr create \
94+
--title ":moyai: \`$VERSION\`" \
95+
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
96+
--base "release/v$VERSION" \
97+
--head $BRANCH
98+
99+
- name: Close Milestone
100+
continue-on-error: true
101+
env:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
run: |
104+
gh api repos/{owner}/{repo}/milestones \
105+
--jq '.[] | select(.title == "${{ steps.properties.outputs.pluginVersionFull }}") | .number' \
106+
| xargs -I '{}' gh api -X PATCH repos/{owner}/{repo}/milestones/{} -F state='closed'

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,3 @@ $RECYCLE.BIN/
2424
**/.DS_Store
2525

2626
.vscode/
27-
28-
/gradle/wrapper/gradle-wrapper.jar
29-
!/gradle/wrapper/gradle-wrapper.properties

CHANGELOG.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
1-
# JCL Highlight Plugin Changelog
1+
# Zowe JCL Support Plugin Changelog
22

33
All notable changes to the Zowe™ JCL plug-in for IntelliJ IDEA™ will be documented in this file.
44

5-
## `0.1.1 (2023-11-20)`
5+
## Unreleased
6+
7+
### Features
8+
9+
* Feature: Added support of the latest IntelliJ IDEA version
10+
* Feature: Dropped support of the IntelliJ IDEA versions below 2023.1
11+
12+
## [0.1.1] (2023-11-20)
13+
14+
### Features
15+
616
* Feature: Separated the plugin to three versions
717
* Feature: Zowe Explorer version update
818
* Feature: Added support for IntelliJ v2023.2
919

20+
## [0.1.0] (2023-05-29)
1021

11-
## `0.1.0 (2023-05-29)`
22+
### Features
1223

1324
* Feature: Empty string as a parameter value ([e6cf5a68](https://github.com/zowe/zowe-jcl-intellij/-/commit/e6cf5a68))
1425
* Feature: Comments after parameters end ([1c83d57c](https://github.com/zowe/zowe-jcl-intellij/-/commit/1c83d57c))
1526
* Feature: Lexer tests ([eab3205f](https://github.com/zowe/zowe-jcl-intellij/-/commit/eab3205f))
1627
* Feature: JCL Highlight init version ([2c82f482](https://github.com/zowe/zowe-jcl-intellij/-/commit/2c82f482))
1728

29+
### Bugfix
1830

1931
* Bugfix: Error if keyword DATA is used in in-stream data declaration ([bcdf053f](https://github.com/zowe/zowe-jcl-intellij/-/commit/bcdf053f))
2032
* Bugfix: Error for NULL statement ([558ac6dd](https://github.com/zowe/zowe-jcl-intellij/-/commit/558ac6dd))
@@ -47,3 +59,7 @@ All notable changes to the Zowe™ JCL plug-in for IntelliJ IDEA™ will be docu
4759
* Bugfix: 'No such operator' for SCHEDULE/XMIT ([55b6bc19](https://github.com/zowe/zowe-jcl-intellij/-/commit/55b6bc19))
4860
* Bugfix: 'No such operator' for COMMAND ([55b6bc19](https://github.com/zowe/zowe-jcl-intellij/-/commit/55b6bc19))
4961
* Bugfix: String cannot be continued on the next line ([ca67f329](https://github.com/zowe/zowe-jcl-intellij/-/commit/ca67f329))
62+
63+
[0.2.0]: https://github.com/zowe/zowe-jcl-intellij/compare/0.1.1...0.2.0
64+
[0.1.1]: https://github.com/zowe/zowe-jcl-intellij/compare/0.1.0...0.1.1
65+
[0.1.0]: https://github.com/zowe/zowe-jcl-intellij/commits/0.1.0

0 commit comments

Comments
 (0)