Skip to content

Commit 20383e6

Browse files
committed
feat: init commit
0 parents  commit 20383e6

File tree

3 files changed

+119
-0
lines changed

3 files changed

+119
-0
lines changed

.github/workflows/release.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
pull_request:
9+
branches: [main]
10+
11+
jobs:
12+
version_check:
13+
name: Version Check
14+
outputs:
15+
UPSTREAM_VERSION: "${{ steps.latest-releases.outputs.upstream-version }}"
16+
RELEASES_VERSION: "${{ steps.latest-releases.outputs.releases-version }}"
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 600
19+
steps:
20+
- name: Check latest release in upstream
21+
id: latest-releases
22+
run: |
23+
get_latest_release() {
24+
URL="https://github.com/$1/$2/releases/latest"
25+
26+
VERSION=$(curl -is "$URL" \
27+
| grep location \
28+
| awk -F '/' '{print $8}')
29+
30+
echo "${VERSION/$'\r'/}"
31+
}
32+
33+
UPS_VER="$(get_latest_release 'microsoft' 'java-debug')"
34+
REL_VER="$(get_latest_release 'nvim-java' 'vscode-java-debug-releases')"
35+
36+
echo "upstream-version=$UPS_VER" >> "$GITHUB_OUTPUT"
37+
echo "releases-version=$REL_VER" >> "$GITHUB_OUTPUT"
38+
39+
linux:
40+
name: "Release"
41+
needs: version_check
42+
if: needs.version_check.outputs.UPSTREAM_VERSION != needs.version_check.outputs.RELEASES_VERSION
43+
runs-on: ubuntu-latest
44+
env:
45+
VERSION: "${{ needs.version_check.outputs.UPSTREAM_VERSION }}"
46+
steps:
47+
- name: Check with current version
48+
run: |
49+
# wget "https://github.com/microsoft/java-debug/archive/refs/tags/${VERSION}.tar.gz"
50+
# tar xf "${VERSION}.tar.gz" -C . --strip-components=1
51+
git clone "https://github.com/microsoft/java-debug.git" .
52+
53+
- name: Set up JDK 17
54+
uses: actions/setup-java@v1
55+
with:
56+
java-version: "17"
57+
58+
- name: Cache local Maven repository
59+
uses: actions/cache@v2
60+
with:
61+
path: ~/.m2/repository
62+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
63+
restore-keys: |
64+
${{ runner.os }}-maven-
65+
66+
- name: Verify
67+
run: ./mvnw clean verify
68+
69+
- name: Checkstyle
70+
run: ./mvnw checkstyle:check
71+
72+
- name: Prepare Artifacts
73+
run: |
74+
mkdir -p extension/server
75+
mv \
76+
"com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-${VERSION}.jar" \
77+
extension/server
78+
79+
zip -r "artifacts.zip" extension
80+
81+
- uses: ncipollo/release-action@v1
82+
with:
83+
artifacts: "artifacts.zip"
84+
allowUpdates: true
85+
artifactErrorsFailBuild: true
86+
name: "${{ env.VERSION }}"
87+
tag: "${{ env.VERSION }}"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 nvim-java
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# :coffee: vscode-java-debug-releases
2+
3+
![Neovim](https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white)
4+
![Lua](https://img.shields.io/badge/lua-%232C2D72.svg?style=for-the-badge&logo=lua&logoColor=white)
5+
![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white)
6+
![Gradle](https://img.shields.io/badge/Gradle-02303A.svg?style=for-the-badge&logo=Gradle&logoColor=white)
7+
![Apache Maven](https://img.shields.io/badge/Apache%20Maven-C71A36?style=for-the-badge&logo=Apache%20Maven&logoColor=white)
8+
9+
This repository releases build artifacts of [vscode-debug-test](https://github.com/microsoft/java-debug)
10+
11+
## Head on to main project [:coffee: nvim-java](https://github.com/nvim-java/nvim-java)

0 commit comments

Comments
 (0)