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