Skip to content

Commit 72ff7b7

Browse files
committed
Update release action
1 parent b3f66cf commit 72ff7b7

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/release.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
name: Release
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
branches: main
6+
7+
permissions:
8+
contents: write
69

710
jobs:
811
release:
912
runs-on: ubuntu-latest
13+
if: startsWith(github.ref, 'refs/tags/')
1014
steps:
1115
- name: Checkout
1216
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -24,11 +28,6 @@ jobs:
2428
run: ./gradlew shadowJar
2529

2630
- name: Upload Release Asset
27-
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
3032
with:
31-
upload_url: ${{ github.event.release.upload_url }}
32-
asset_path: ./build/libs/split-tests-java.jar
33-
asset_name: split-tests-java-${{ github.event.release.name }}.jar
34-
asset_content_type: application/java-archive
33+
files: build/libs/split-tests-java.jar

0 commit comments

Comments
 (0)