|
@@ -1,195 +0,0 @@
|
|
|
-# Releases a new patch version from a release branch
|
|
|
-name: Patch Release Build
|
|
|
-on:
|
|
|
- workflow_dispatch:
|
|
|
- inputs:
|
|
|
- release-branch-name:
|
|
|
- description: The release branch to use, e.g. v1.9.x
|
|
|
- required: true
|
|
|
- version:
|
|
|
- # TODO (trask) this is redundant
|
|
|
- description: The version of the release, e.g. 1.9.1 (without the "v" prefix)
|
|
|
- required: true
|
|
|
-
|
|
|
-jobs:
|
|
|
- test:
|
|
|
- runs-on: ubuntu-latest
|
|
|
- strategy:
|
|
|
- matrix:
|
|
|
- test-java-version:
|
|
|
- - 8
|
|
|
- - 11
|
|
|
- - 15
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v2.3.4
|
|
|
- with:
|
|
|
- ref: ${{ github.event.inputs.release-branch-name }}
|
|
|
-
|
|
|
- - id: setup-test-java
|
|
|
- name: Set up JDK ${{ matrix.test-java-version }} for running tests
|
|
|
- uses: actions/setup-java@v2
|
|
|
- with:
|
|
|
- distribution: adopt
|
|
|
- java-version: ${{ matrix.test-java-version }}
|
|
|
-
|
|
|
- - name: Set up JDK 11 for running Gradle
|
|
|
- uses: actions/setup-java@v2
|
|
|
- with:
|
|
|
- distribution: adopt
|
|
|
- java-version: 11
|
|
|
-
|
|
|
- - name: Test
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- with:
|
|
|
- arguments: test -PtestJavaVersion=${{ matrix.test-java-version }} -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false
|
|
|
-
|
|
|
- # testLatestDeps is intentionally not included in the release workflows
|
|
|
- # because any time a new library version is released to maven central
|
|
|
- # it can fail due to test code incompatibility with the new library version,
|
|
|
- # or due to slight changes in emitted telemetry
|
|
|
-
|
|
|
- smoke-test:
|
|
|
- runs-on: ${{ matrix.os }}
|
|
|
- strategy:
|
|
|
- matrix:
|
|
|
- os:
|
|
|
- - windows-latest
|
|
|
- - ubuntu-latest
|
|
|
- smoke-test-suite:
|
|
|
- - jetty
|
|
|
- - liberty
|
|
|
- - payara
|
|
|
- - tomcat
|
|
|
- - tomee
|
|
|
- - websphere
|
|
|
- - wildfly
|
|
|
- - other
|
|
|
- exclude:
|
|
|
- - os: windows-latest
|
|
|
- smoke-test-suite: websphere
|
|
|
- steps:
|
|
|
- - name: Support longpaths
|
|
|
- run: git config --system core.longpaths true
|
|
|
- if: matrix.os == 'windows-latest'
|
|
|
-
|
|
|
- - uses: actions/checkout@v2.3.4
|
|
|
- with:
|
|
|
- ref: ${{ github.event.inputs.release-branch-name }}
|
|
|
-
|
|
|
- - name: Set up JDK 11 for running Gradle
|
|
|
- uses: actions/setup-java@v2
|
|
|
- with:
|
|
|
- distribution: adopt
|
|
|
- java-version: 11
|
|
|
-
|
|
|
- - name: Test
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- with:
|
|
|
- arguments: ":smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}"
|
|
|
-
|
|
|
- # muzzle is intentionally not included in the release workflows
|
|
|
- # because any time a new library version is released to maven central it can fail,
|
|
|
- # and this is not a reason to hold up the release
|
|
|
-
|
|
|
- examples:
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v2.3.4
|
|
|
- with:
|
|
|
- ref: ${{ github.event.inputs.release-branch-name }}
|
|
|
-
|
|
|
- - name: Set up JDK 11 for running Gradle
|
|
|
- uses: actions/setup-java@v2
|
|
|
- with:
|
|
|
- distribution: adopt
|
|
|
- java-version: 11
|
|
|
-
|
|
|
- - name: Local publish of artifacts
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- with:
|
|
|
- # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
|
|
|
- arguments: publishToMavenLocal -x javadoc
|
|
|
-
|
|
|
- - name: Local publish of gradle plugins
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- with:
|
|
|
- # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
|
|
|
- arguments: publishToMavenLocal -x javadoc
|
|
|
- build-root-directory: gradle-plugins
|
|
|
-
|
|
|
- - name: Build distro
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- with:
|
|
|
- arguments: build --init-script ../../.github/scripts/local.init.gradle.kts
|
|
|
- build-root-directory: examples/distro
|
|
|
-
|
|
|
- - name: Build extension
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- with:
|
|
|
- arguments: build --init-script ../../.github/scripts/local.init.gradle.kts
|
|
|
- build-root-directory: examples/extension
|
|
|
-
|
|
|
- - name: Run muzzle check against extension
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- with:
|
|
|
- arguments: muzzle --init-script ../../.github/scripts/local.init.gradle.kts
|
|
|
- build-root-directory: examples/extension
|
|
|
- cache-read-only: true
|
|
|
-
|
|
|
- release:
|
|
|
- needs: [ test, smoke-test, examples ]
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v2.3.4
|
|
|
- with:
|
|
|
- ref: ${{ github.event.inputs.release-branch-name }}
|
|
|
-
|
|
|
- - name: Set up JDK 11 for running Gradle
|
|
|
- uses: actions/setup-java@v2
|
|
|
- with:
|
|
|
- distribution: adopt
|
|
|
- java-version: 11
|
|
|
-
|
|
|
- - name: Build and publish artifacts
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- with:
|
|
|
- arguments: assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
|
|
|
- env:
|
|
|
- SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
|
|
- SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
|
|
|
- GRGIT_USER: ${{ github.actor }}
|
|
|
- GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
- GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
|
|
|
-
|
|
|
- - name: Build and publish gradle plugins
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
- env:
|
|
|
- GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
|
|
|
- GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
|
|
|
- with:
|
|
|
- arguments: build publishPlugins
|
|
|
- build-root-directory: gradle-plugins
|
|
|
-
|
|
|
- - name: Create Release
|
|
|
- id: create_release
|
|
|
- uses: actions/create-release@v1.1.4
|
|
|
- env:
|
|
|
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- with:
|
|
|
- tag_name: v${{ github.event.inputs.version }}
|
|
|
- commitish: ${{ github.event.inputs.release-branch-name }}
|
|
|
- release_name: Release v${{ github.event.inputs.version }}
|
|
|
- draft: true
|
|
|
- prerelease: false
|
|
|
-
|
|
|
- - name: Upload Release Asset
|
|
|
- id: upload-release-asset
|
|
|
- uses: actions/upload-release-asset@v1.0.2
|
|
|
- env:
|
|
|
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
- with:
|
|
|
- upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
- asset_path: javaagent/build/libs/opentelemetry-javaagent-${{ github.event.inputs.version }}.jar
|
|
|
- asset_name: opentelemetry-javaagent.jar
|
|
|
- asset_content_type: application/java-archive
|