Skip to content

Commit 84304ff

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

27 files changed

+548
-163
lines changed

.github/workflows/build.yml

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