Browse Source

Switch from unmaintained release actions (#5644)

Trask Stalnaker 3 years ago
parent
commit
62cc5ccea8
2 changed files with 14 additions and 38 deletions
  1. 9 20
      .github/workflows/release.yml
  2. 5 18
      RELEASING.md

+ 9 - 20
.github/workflows/release.yml

@@ -138,25 +138,14 @@ jobs:
             | perl -0pe 's/\n +/ /g' \
             >> release-notes.txt
 
-      - name: Create Release
-        id: create_release
-        uses: actions/create-release@v1.1.4
+      - name: Create GitHub release
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        with:
-          tag_name: v${{ steps.set-versions.outputs.release-version }}
-          release_name: Version ${{ steps.set-versions.outputs.release-version }}
-          draft: true
-          prerelease: false
-          body_path: release-notes.txt
-
-      - 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-${{ steps.set-versions.outputs.release-version }}.jar
-          asset_name: opentelemetry-javaagent.jar
-          asset_content_type: application/java-archive
+        run: |
+          cp javaagent/build/libs/opentelemetry-javaagent-${{ steps.set-versions.outputs.release-version }}.jar opentelemetry-javaagent.jar
+          gh release create --target ${{ github.ref_name }} \
+                            --title "Version ${{ steps.set-versions.outputs.release-version }}" \
+                            --notes-file release-notes.txt \
+                            --discussion-category announcements \
+                            v${{ steps.set-versions.outputs.release-version }} \
+                            opentelemetry-javaagent.jar

+ 5 - 18
RELEASING.md

@@ -26,19 +26,12 @@ Open the [Release workflow](https://github.com/open-telemetry/opentelemetry-java
 Press the "Run workflow" button, then select the release branch from the dropdown list,
 e.g. `v1.9.x`, and click the "Run workflow" button below that.
 
-This triggers the release process, which builds the artifacts, publishes the artifacts, and creates
-and pushes a git tag with the version number.
-
-Once the GitHub workflow completes, go to Github
-[release page](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases),
-find the draft release created by the release workflow, and
-* Select the checkbox for "Create a discussion for this release"
-* Press the "Publish release" button
+This workflow will publish the artifacts to maven central and will publish a github release with the
+javaagent jar attached and release notes based on the change log.
 
 ## Patch Release
 
-All patch releases should include only bug-fixes, and must avoid
-adding/modifying the public APIs.
+All patch releases should include only bug-fixes, and must avoid adding/modifying the public APIs.
 
 In general, patch releases are only made for bug-fixes for the following types of issues:
 * Regressions
@@ -59,14 +52,8 @@ Open the [Release workflow](https://github.com/open-telemetry/opentelemetry-java
 Press the "Run workflow" button, then select the release branch from the dropdown list,
 e.g. `v1.9.x`, and click the "Run workflow" button below that.
 
-This triggers the release process, which builds the artifacts, publishes the artifacts, and creates
-and pushes a git tag with the version number.
-
-Once the GitHub workflow completes, go to Github
-[release page](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases),
-find the draft release created by the release workflow, and
-* Select the checkbox for "Create a discussion for this release"
-* Press the "Publish release" button
+This workflow will publish the artifacts to maven central and will publish a github release with the
+javaagent jar attached and release notes based on the change log.
 
 After making the release: