From 177951f3ccf7bf8b50b63158ad9055e9975f59eb Mon Sep 17 00:00:00 2001 From: Owen Nelson Date: Fri, 3 Jan 2025 13:44:17 -0800 Subject: [PATCH] Libs: change release workflows to be triggered by release published We had an issue where pushing tags named for version numbers caused unwanted side-effects. Attempting to avoid this: - no longer manually push tags. - let the GitHub release automatically tag when it publishes. - drive the other release workflows based on release: published events. By moving the trigger off of tag push, this additionally opens the door for situations where we need to push a tag then create a release for it since the lib workflows won't be triggered until the release is finalized. --- .github/workflows/csharp-release.yml | 5 ++--- .github/workflows/java-release.yml | 5 ++--- .github/workflows/javascript-release.yml | 4 ++-- .github/workflows/kotlin-release.yml | 5 ++--- .github/workflows/php-release.yml | 5 ++--- .github/workflows/python-release.yml | 5 ++--- .github/workflows/ruby-release.yml | 5 ++--- .github/workflows/rust-release.yml | 5 ++--- .github/workflows/update-postman.yml | 5 ++--- 9 files changed, 18 insertions(+), 26 deletions(-) diff --git a/.github/workflows/csharp-release.yml b/.github/workflows/csharp-release.yml index 68b78c114..f2a6df154 100644 --- a/.github/workflows/csharp-release.yml +++ b/.github/workflows/csharp-release.yml @@ -1,9 +1,8 @@ name: C# Release on: - push: - tags: - - 'v*' + release: + types: [published] jobs: dotnet: diff --git a/.github/workflows/java-release.yml b/.github/workflows/java-release.yml index a2788fcd6..9efda98b1 100644 --- a/.github/workflows/java-release.yml +++ b/.github/workflows/java-release.yml @@ -1,9 +1,8 @@ name: Java Release on: - push: - tags: - - 'v*' + release: + types: [published] jobs: dotnet: diff --git a/.github/workflows/javascript-release.yml b/.github/workflows/javascript-release.yml index aae657ba8..f9d5702d9 100644 --- a/.github/workflows/javascript-release.yml +++ b/.github/workflows/javascript-release.yml @@ -8,8 +8,8 @@ on: - 'openapi.json' - 'javascript/**' - '.github/workflows/javascript-release.yml' - tags: - - 'v*' + release: + types: [published] jobs: build: diff --git a/.github/workflows/kotlin-release.yml b/.github/workflows/kotlin-release.yml index 649835d94..4dfd58b91 100644 --- a/.github/workflows/kotlin-release.yml +++ b/.github/workflows/kotlin-release.yml @@ -1,9 +1,8 @@ name: Kotlin Release on: - push: - tags: - - 'v*' + release: + types: [published] jobs: kotlin: diff --git a/.github/workflows/php-release.yml b/.github/workflows/php-release.yml index e76e0c14a..6e1262171 100644 --- a/.github/workflows/php-release.yml +++ b/.github/workflows/php-release.yml @@ -1,9 +1,8 @@ name: PHP Release on: - push: - tags: - - 'v*' + release: + types: [published] jobs: packagist: diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index 59639b75c..c311caeec 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -1,9 +1,8 @@ name: Python Release on: - push: - tags: - - 'v*' + release: + types: [published] jobs: build: diff --git a/.github/workflows/ruby-release.yml b/.github/workflows/ruby-release.yml index 6fba7e363..0e50825a1 100644 --- a/.github/workflows/ruby-release.yml +++ b/.github/workflows/ruby-release.yml @@ -1,9 +1,8 @@ name: Ruby Release on: - push: - tags: - - 'v*' + release: + types: [published] jobs: dotnet: diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index dec228d26..e83d25aa8 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -1,9 +1,8 @@ name: Rust Release on: - push: - tags: - - 'v*' + release: + types: [published] env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/update-postman.yml b/.github/workflows/update-postman.yml index b7c8bf77b..2d93cb099 100644 --- a/.github/workflows/update-postman.yml +++ b/.github/workflows/update-postman.yml @@ -1,9 +1,8 @@ name: Update Postman Collection on: - push: - tags: - - 'v*' + release: + types: [published] jobs: postman: