Create draft release with uploaded agent in github workflow.
MODIFY
.github/workflows/patch-release-build.yml
.github/workflows/patch-release-build.yml
@@ -78,3 +78,23 @@ jobs:
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: v${{ github.event.inputs.version }}
+ 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
+ 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 }}-all.jar
+ asset_name: opentelemetry-javaagent-all.jar
+ asset_content_type: application/java-archive

MODIFY
.github/workflows/release-build.yml
.github/workflows/release-build.yml
@@ -31,3 +31,23 @@ jobs:
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: v${{ github.event.inputs.version }}
+ 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
+ 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 }}-all.jar
+ asset_name: opentelemetry-javaagent-all.jar
+ asset_content_type: application/java-archive

Create draft release with uploaded agent in github workflow. (#2237)