From afccc20b6027feda86fd1069e882f41bad28dbad Mon Sep 17 00:00:00 2001 From: aboyko Date: Wed, 12 Jul 2023 15:57:08 -0400 Subject: [PATCH] Try gh hosted macos runner for distro build. Switch off workflow run on push --- .../workflows/eclipse-ls-extensions-build.yml | 10 +-- .../experimental-eclipse-distro-build.yml | 79 +++++++++++++++++++ 2 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/experimental-eclipse-distro-build.yml diff --git a/.github/workflows/eclipse-ls-extensions-build.yml b/.github/workflows/eclipse-ls-extensions-build.yml index 2b95ea112..7a62a5180 100644 --- a/.github/workflows/eclipse-ls-extensions-build.yml +++ b/.github/workflows/eclipse-ls-extensions-build.yml @@ -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: diff --git a/.github/workflows/experimental-eclipse-distro-build.yml b/.github/workflows/experimental-eclipse-distro-build.yml new file mode 100644 index 000000000..7c4ba85c9 --- /dev/null +++ b/.github/workflows/experimental-eclipse-distro-build.yml @@ -0,0 +1,79 @@ +name: Experimental Eclipse Distro STS Build + +on: + workflow_dispatch: + inputs: + eclipse_profile: + description: Eclipse profile 'e428' etc + required: true + default: 'e428' + type: string + build_type: + description: Build type such as 'snapshot', 'milestone' or 'release' + required: true + default: 'snapshot' + type: string + ref: + description: Git branch, tag, commit hash + required: false + default: 'main' + type: string + +jobs: + + eclipse-distro-build: + runs-on: macos-latest + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + with: + ref: ${{ inputs.ref }} + - name: Set up JDK 17 + uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 + with: + java-version: '17' + distribution: 'temurin' + - name: Enforce https instead of http + run: ./nohttp.sh + - name: Install GPG key + run: | + echo "${{ secrets.GPG_PRIVATE_KEY }}" > gpg.asc + echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --passphrase-fd 0 --import gpg.asc + - name: Create Keychain + env: + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH + + security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + + security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH + - name: Unlock Keychain for OSX signing + run: | + security unlock-keychain -p ${{ secrets.KEYCHAIN_PASSWORD }} $RUNNER_TEMP/app-signing.keychain-db +# - name: Install appdmg +# run: | +# npm install -g appdmg + - name: Create Temp Directory Structure for Notarization Service + run: | + cd /tmp + mkdir -p macos-notarization-service/pending-files + - name: Build Eclipse Distro + env: + tools_s3_access_key: ${{ secrets.TOOLS_S3_ACCESS_KEY }} + tools_s3_secret_key: ${{ secrets.TOOLS_S3_SECRET_KEY }} + gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} + gpg_keyname: ${{ secrets.GPG_KEYID }} + MACOS_CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }} + KEYCHAIN: $RUNNER_TEMP/app-signing.keychain-db + MACOS_NOTARIZATION_SERVICE_URL: http://localhost:8080 + run: | + cd eclipse-distribution + ./mvnw --batch-mode -U clean package -P${{ inputs.eclipse_profile }} -P${{ inputs.build_type }} -Pgitactions -Pgpg.sign -Dsigning.skip=true -Dmaven.repo.local=~/.m2/repository-signed -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Ds3service.https-only=true -Dp2.replaceQualifier=true -Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout=1200000 -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.eclipserun.proxies=false -Dskip.osx.signing=false -Dskip.win.signing=false -Dskip.osx.notarizing=false -Dtycho.equinox.resolver.uses=true \ No newline at end of file