From 4c5fa21a7e819bbcf7a8558685b23cafef1cbb7c Mon Sep 17 00:00:00 2001 From: Mikhail Puzanov Date: Wed, 6 Nov 2024 13:10:12 +0100 Subject: [PATCH] Add release.yml --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9159620 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release Upload +on: + release: + types: [ "published" ] + +jobs: + publish: + runs-on: ubuntu-latest + needs: build + if: ${{ github.ref == 'refs/heads/main' }} + + steps: + - uses: actions/checkout@v3 + + - name: Setup java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 11 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2.12.0 + + - name: Rename the package + run: mv $(find build/distributions -name rpki-ta-0\*.tgz) rpki-ta-0-java-11.tgz + + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: rpki-ta-0-java-11.tgz + asset_name: rpki-ta-0-java-11.tgz + tag: ${{ github.ref }} +