GHA: build on every push. Remove unnecessary files

This commit is contained in:
aboyko
2023-07-20 02:25:14 -04:00
parent d8ead7aa62
commit 80a88b16af
17 changed files with 11 additions and 270 deletions

View File

@@ -1,12 +1,12 @@
name: Eclipse LS Extensions Snapshot Build
# configure manual trigger
on:
workflow_dispatch:
#on:
# push:
# branches:
# - 'main'
# workflow_dispatch:
on:
push:
branches:
- 'main'
jobs:

View File

@@ -12,11 +12,11 @@ on:
types: [completed]
branches:
- "main"
workflow_dispatch:
# workflow_dispatch:
jobs:
e427-distro:
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml
with:
eclipse_profile: 'e427'

View File

@@ -12,11 +12,11 @@ on:
types: [completed]
branches:
- "main"
workflow_dispatch:
# workflow_dispatch:
jobs:
e428-distro:
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml
with:
eclipse_profile: 'e428'

View File

@@ -10,11 +10,11 @@ on:
types: [completed]
branches:
- "main"
workflow_dispatch:
# workflow_dispatch:
jobs:
e429-distro:
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml
with:
eclipse_profile: 'e429'

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>

View File

@@ -1,10 +0,0 @@
{
"title": "Spring Tool Suite 4",
"icon": "../org.springframework.boot.ide.branding/sts4.icns",
"contents": [
{ "x": 192, "y": 100, "type": "file", "path": "target/products/org.springframework.boot.ide.branding.sts4/macosx/cocoa/aarch64/SpringToolSuite4.app" },
{ "x": 448, "y": 100, "type": "link", "path": "/Applications" },
{ "x": 1000, "y": 2000, "type": "file", "path": "../org.springframework.boot.ide.branding/sts4.icns", "name": ".VolumeIcon.icns" }
],
"format": "UDZO"
}

View File

@@ -1,10 +0,0 @@
{
"title": "Spring Tool Suite 4",
"icon": "../org.springframework.boot.ide.branding/sts4.icns",
"contents": [
{ "x": 192, "y": 100, "type": "file", "path": "target/products/org.springframework.boot.ide.branding.sts4/macosx/cocoa/x86_64/SpringToolSuite4.app" },
{ "x": 448, "y": 100, "type": "link", "path": "/Applications" },
{ "x": 1000, "y": 2000, "type": "file", "path": "../org.springframework.boot.ide.branding/sts4.icns", "name": ".VolumeIcon.icns" }
],
"format": "UDZO"
}

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
DMG=$1
NOTARIZE_SERVICE_URL=$2
echo "Notarize DMG"
echo ${DMG}
RESPONSE=\
$(curl -s -X POST \
-F file=@${DMG} \
-F 'options={"primaryBundleId": "SpringTools4", "staple": true};type=application/json' \
${NOTARIZE_SERVICE_URL}/macos-notarization-service/notarize)
echo "Notarization request submitted"
echo ${RESPONSE}
UUID=$(echo ${RESPONSE} | jq -r '.uuid')
STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status')
echo "Status after submitting"
echo ${STATUS}
while [[ ${STATUS} == 'IN_PROGRESS' ]]; do
sleep 60
RESPONSE=$(curl -s ${NOTARIZE_SERVICE_URL}/macos-notarization-service/${UUID}/status)
STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status')
echo "Waiting for status to change"
echo ${RESPONSE}
echo ${STATUS}
done
echo "Status is not in progress anymore"
echo ${RESPONSE}
echo ${STATUS}
if [[ ${STATUS} != 'COMPLETE' ]]; then
echo "Notarization failed: ${RESPONSE}"
exit 1
fi
mv "${DMG}" "${DMG}-unnotarized"
curl -o ${DMG} -J ${NOTARIZE_SERVICE_URL}/macos-notarization-service/${UUID}/download

View File

@@ -1,10 +0,0 @@
{
"title": "Spring Tool Suite 4",
"icon": "../org.springframework.boot.ide.branding/sts4.icns",
"contents": [
{ "x": 192, "y": 100, "type": "file", "path": "target/products/org.springframework.boot.ide.branding.sts4/macosx/cocoa/aarch64/SpringToolSuite4.app" },
{ "x": 448, "y": 100, "type": "link", "path": "/Applications" },
{ "x": 1000, "y": 2000, "type": "file", "path": "../org.springframework.boot.ide.branding/sts4.icns", "name": ".VolumeIcon.icns" }
],
"format": "UDZO"
}

View File

@@ -1,10 +0,0 @@
{
"title": "Spring Tool Suite 4",
"icon": "../org.springframework.boot.ide.branding/sts4.icns",
"contents": [
{ "x": 192, "y": 100, "type": "file", "path": "target/products/org.springframework.boot.ide.branding.sts4/macosx/cocoa/x86_64/SpringToolSuite4.app" },
{ "x": 448, "y": 100, "type": "link", "path": "/Applications" },
{ "x": 1000, "y": 2000, "type": "file", "path": "../org.springframework.boot.ide.branding/sts4.icns", "name": ".VolumeIcon.icns" }
],
"format": "UDZO"
}

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>

View File

@@ -1,46 +0,0 @@
#!/usr/bin/env bash
DMG=$1
NOTARIZE_SERVICE_URL=$2
echo "Notarize DMG"
echo ${DMG}
RESPONSE=\
$(curl -s -X POST \
-F file=@${DMG} \
-F 'options={"primaryBundleId": "SpringTools4", "staple": true};type=application/json' \
${NOTARIZE_SERVICE_URL}/macos-notarization-service/notarize)
echo "Notarization request submitted"
echo ${RESPONSE}
UUID=$(echo ${RESPONSE} | jq -r '.uuid')
STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status')
echo "Status after submitting"
echo ${STATUS}
while [[ ${STATUS} == 'IN_PROGRESS' ]]; do
sleep 60
RESPONSE=$(curl -s ${NOTARIZE_SERVICE_URL}/macos-notarization-service/${UUID}/status)
STATUS=$(echo ${RESPONSE} | jq -r '.notarizationStatus.status')
echo "Waiting for status to change"
echo ${RESPONSE}
echo ${STATUS}
done
echo "Status is not in progress anymore"
echo ${RESPONSE}
echo ${STATUS}
if [[ ${STATUS} != 'COMPLETE' ]]; then
echo "Notarization failed: ${RESPONSE}"
exit 1
fi
mv "${DMG}" "${DMG}-unnotarized"
curl -o ${DMG} -J ${NOTARIZE_SERVICE_URL}/macos-notarization-service/${UUID}/download

View File

@@ -1,53 +0,0 @@
set -e
file=$1
filename="$(basename -- $file)"
dir="$(dirname "$file")"
echo "****************************************************************"
echo "*** Processing : ${file}"
echo "****************************************************************"
destination_folder_name=extracted_${filename}
echo "Extracting archive ${filename} to ${dir}/${destination_folder_name}"
mkdir ${dir}/${destination_folder_name}
tar -zxf $file --directory ${dir}/${destination_folder_name}
echo "Successfully extracted ${filename}"
echo "About to sign OSX .app file: ${dir}/${destination_folder_name}/SpringToolSuite4.app"
cd ${dir}/${destination_folder_name}
echo "Generating dmg-config.json..."
echo '{' >> dmg-config.json
echo ' "title": "Spring Tool Suite 4",' >> dmg-config.json
echo ' "icon": "/Users/aboyko/git/sts4/eclipse-distribution/org.springframework.boot.ide.branding/sts4.icns",' >> dmg-config.json
echo ' "contents": [' >> dmg-config.json
echo ' { "x": 192, "y": 100, "type": "file", "path": "./SpringToolSuite4.app" },' >> dmg-config.json
echo ' { "x": 448, "y": 100, "type": "link", "path": "/Applications" },' >> dmg-config.json
echo ' { "x": 1000, "y": 2000, "type": "file", "path": "/Users/aboyko/git/sts4/eclipse-distribution/org.springframework.boot.ide.branding/sts4.icns", "name": ".VolumeIcon.icns" }' >> dmg-config.json
echo ' ],' >> dmg-config.json
echo ' "format": "UDZO"' >> dmg-config.json
echo '}' >> dmg-config.json
cat ./dmg-config.json
dmg_filename=${filename%.*.*}.dmg
appdmg ./dmg-config.json ../${dmg_filename}
cd ..
rm -rf ./${destination_folder_name}
echo "Checksums $dmg_filename"
(shasum -a 256 $dmg_filename > ${dmg_filename}.sha256 \
&& md5 $dmg_filename > ${dmg_filename}.md5) &
wait
echo "Completed"
#rm -f $filename
#zip -r -q ../$file .
#cd ..
#echo "Successfully zipped ${destination_folder_name} into ${file}"
#java -jar $self_extr_jar $file
#echo "Remove temporary ${destination_folder_name}"
#rm -rf ./${destination_folder_name}
#
#echo "Creating checksums sha-256 and md5 for ${file}"
#shasum -a 256 $file > ${file}.sha256
#md5 $file > ${file}.md5
#self_jar_file=${file%.*}.self-extracting.jar
#echo "Creating checksums sha-256 and md5 for ${self_jar_file}"
#shasum -a 256 $self_jar_file > ${self_jar_file}.sha256
#md5 $self_jar_file > ${self_jar_file}.md5

View File

@@ -1,10 +0,0 @@
{
"title": "Spring Tool Suite 4",
"icon": "../org.springframework.boot.ide.branding/sts4.icns",
"contents": [
{ "x": 192, "y": 100, "type": "file", "path": "target/products/org.springframework.boot.ide.branding.sts4/macosx/cocoa/aarch64/SpringToolSuite4.app" },
{ "x": 448, "y": 100, "type": "link", "path": "/Applications" },
{ "x": 1000, "y": 2000, "type": "file", "path": "../org.springframework.boot.ide.branding/sts4.icns", "name": ".VolumeIcon.icns" }
],
"format": "UDZO"
}

View File

@@ -1,10 +0,0 @@
{
"title": "Spring Tool Suite 4",
"icon": "../org.springframework.boot.ide.branding/sts4.icns",
"contents": [
{ "x": 192, "y": 100, "type": "file", "path": "target/products/org.springframework.boot.ide.branding.sts4/macosx/cocoa/x86_64/SpringToolSuite4.app" },
{ "x": 448, "y": 100, "type": "link", "path": "/Applications" },
{ "x": 1000, "y": 2000, "type": "file", "path": "../org.springframework.boot.ide.branding/sts4.icns", "name": ".VolumeIcon.icns" }
],
"format": "UDZO"
}