Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IJMP-1844 Release preparations #16

Merged
merged 3 commits into from
Aug 29, 2024
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
123 changes: 123 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Build

on: [push, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the plugin GitHub repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true

- name: Check repository content
shell: bash
run: pwd && ls -la

- name: Build plugin's binary
shell: bash
run: ./gradlew build

- name: Prepare Plugin Artifact
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
echo "zip artifact name:"
echo "$FILENAME"

- name: Publish built plugin to artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
test:
needs: [build]
runs-on: ubuntu-latest
steps:

- name: Checkout the plugin GitHub repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true

- name: Run tests
shell: bash
run: ./gradlew test

- name: Publish tests result to artifacts
uses: actions/upload-artifact@v4
with:
name: tests-report
path: ${{ github.workspace }}/build/reports/tests

- name: Publish code coverage report to artifacts
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: ${{ github.workspace }}/build/reports/kover/html

verify:
if: ${{ contains(github.ref, 'refs/heads/release/') }}
needs: [build]
runs-on: ubuntu-latest
steps:

- name: Maximize Build Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
large-packages: false

- name: Checkout the plugin GitHub repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true

- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v4
with:
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}

- name: Verify plugin against IntelliJ IDEA IDE's
continue-on-error: true
shell: bash
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}

- name: Collect Plugin Verifier Result
uses: actions/upload-artifact@v4
with:
name: plugin-verifier-report
path: ${{ github.workspace }}/build/reports/pluginVerifier
106 changes: 106 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:

- name: Checkout the plugin GitHub repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true

- name: Fetch Gradle properties
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
PLUGIN_VERSION_FULL="$(echo "$PROPERTIES" | grep "^pluginVersion:" | cut -f2- -d ' ')"
CURR_COMMIT="$(git rev-parse HEAD)"

echo "pluginVersionFull: $PLUGIN_VERSION_FULL"
echo "currCommit: $CURR_COMMIT"

echo "pluginVersionFull=$PLUGIN_VERSION_FULL" >> $GITHUB_OUTPUT
echo "currCommit=$CURR_COMMIT" >> $GITHUB_OUTPUT

- name: Publish Plugin
env:
ZOWE_INTELLIJ_MARKET_TOKEN: ${{ secrets.ZOWE_INTELLIJ_MARKET_TOKEN }}
INTELLIJ_SIGNING_CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_SIGNING_CERTIFICATE_CHAIN }}
INTELLIJ_SIGNING_PRIVATE_KEY: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY }}
INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD }}
run: ./gradlew publishPlugin

- name: Prepare release notes
id: release_notes
shell: bash
run: |
CHANGELOG="$(./gradlew getChangelog -q)"

echo 'version_release_notes<<EOF' >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT

echo "Release notes to be added:"
echo "$CHANGELOG"

- name: Create new tag and release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag ${{ steps.properties.outputs.pluginVersionFull }}
git push origin ${{ steps.properties.outputs.pluginVersionFull }}
gh release create ${{ steps.properties.outputs.pluginVersionFull }} --title ${{ steps.properties.outputs.pluginVersionFull }} --target ${{ steps.properties.outputs.currCommit }} -F- <<EOF
${{ steps.release_notes.outputs.version_release_notes }}
EOF

- name: Upload Release Built Artifact
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.properties.outputs.pluginVersionFull }} ./build/distributions/*

- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ steps.properties.outputs.pluginVersionFull }}"
BRANCH="release-changelog-update-$VERSION"

git config user.email "action@github.com"
git config user.name "GitHub Action"

git checkout -b $BRANCH
git commit -am ":moyai: ${VERSION}" -m "[skip ci]"
git push --set-upstream origin $BRANCH

gh pr create \
--title ":moyai: \`$VERSION\`" \
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
--base "release/v$VERSION" \
--head $BRANCH

- name: Close Milestone
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/{owner}/{repo}/milestones \
--jq '.[] | select(.title == "${{ steps.properties.outputs.pluginVersionFull }}") | .number' \
| xargs -I '{}' gh api -X PATCH repos/{owner}/{repo}/milestones/{} -F state='closed'
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,3 @@ $RECYCLE.BIN/
**/.DS_Store

.vscode/

/gradle/wrapper/gradle-wrapper.jar
!/gradle/wrapper/gradle-wrapper.properties
22 changes: 19 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# JCL Highlight Plugin Changelog
# Zowe JCL Support Plugin Changelog

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

## `0.1.1 (2023-11-20)`
## Unreleased

### Features

* Feature: Added support of the latest IntelliJ IDEA version
* Feature: Dropped support of the IntelliJ IDEA versions below 2023.1

## [0.1.1] (2023-11-20)

### Features

* Feature: Separated the plugin to three versions
* Feature: Zowe Explorer version update
* Feature: Added support for IntelliJ v2023.2

## [0.1.0] (2023-05-29)

## `0.1.0 (2023-05-29)`
### Features

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

### Bugfix

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

[0.2.0]: https://github.com/zowe/zowe-jcl-intellij/compare/0.1.1...0.2.0
[0.1.1]: https://github.com/zowe/zowe-jcl-intellij/compare/0.1.0...0.1.1
[0.1.0]: https://github.com/zowe/zowe-jcl-intellij/commits/0.1.0
Loading
Loading