Skip to content

Commit bc20393

Browse files
authored
Update build.yml
1 parent 64c089d commit bc20393

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- name: Build with Gradle
3535
run: ./gradlew build -x test -Pversion=$TP_SDK_VERSION $SDK_BUILD_ARGS
3636
- name: Define FULL jar name
37+
if: startsWith(github.ref, 'refs/tags/v')
3738
run: |
3839
if [ -z "$SDK_BUILD_ARGS" ]
3940
then
@@ -49,18 +50,24 @@ jobs:
4950
echo "TP_SDK_FULL_JAR_EXT=FULL.jar" >> $GITHUB_ENV
5051
echo "TP_SDK_JAR_EXT=.jar" >> $GITHUB_ENV
5152
- name: Upload FULL jar to release
53+
if: startsWith(github.ref, 'refs/tags/v')
5254
uses: svenstaro/upload-release-action@v2
5355
with:
5456
repo_token: ${{ secrets.GITHUB_TOKEN }}
5557
file: build/libs/${{ env.TP_SDK_JAR_NAME }}-${{ env.TP_SDK_VERSION }}-${{ env.TP_SDK_VARIANT}}-${{ env.TP_SDK_FULL_JAR_EXT }}
5658
asset_name: ${{ env.TP_SDK_JAR_NAME }}${{ env.TP_SDK_JAR_EXT }}
5759
tag: ${{ github.ref }}
5860
overwrite: true
59-
- name: Create jar's hash file
61+
- name: Create jar's hash file
62+
if: startsWith(github.ref, 'refs/tags/v')
6063
run: |
6164
md5sum build/libs/${{ env.TP_SDK_JAR_NAME }}-${{ env.TP_SDK_VERSION }}-${{ env.TP_SDK_VARIANT}}-${{ env.TP_SDK_FULL_JAR_EXT }} > build/libs/jar-hash.md
6265
- name: Upload hash artifact
63-
uses: actions/upload-artifact@v2
66+
if: startsWith(github.ref, 'refs/tags/v')
67+
uses: svenstaro/upload-release-action@v2
6468
with:
65-
name: Asset Hashes
66-
path: build/libs/jar-hash.md
69+
repo_token: ${{ secrets.GITHUB_TOKEN }}
70+
file: build/libs/jar-hash.md
71+
asset_name: ${{ env.TP_SDK_JAR_NAME }}.md5
72+
tag: ${{ github.ref }}
73+
overwrite: true

0 commit comments

Comments
 (0)