From 825bc048e449979bbf029f4bc45a84eb7b16184b Mon Sep 17 00:00:00 2001 From: harveymmaunders Date: Fri, 17 Jan 2025 17:15:09 +0000 Subject: [PATCH 1/2] GitHub Release for individual ZIP templates --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 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..4d3b067 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Github Release for ZIP templates + +on: + push: + branches: + - main + +jobs: + create-release: + name: Create GitHub Release + runs-on: ubuntu-latest + strategy: + matrix: + language: [java, python] + type: [rest, websockets] + steps: + # Step 1: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v3 + + # Step 2: Create a ZIP archive of the files + - name: Create ZIP archive + run: | + mkdir -p artifacts + cd client-samples/${{ matrix.language }}/${{ matrix.type }} + zip -r ../../../artifacts/${{ matrix.language }}-${{ matrix.type }}.zip . + + # Step 3: Upload binaries to release + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/${{ matrix.language }}-${{ matrix.type }}.zip + tag: Templates + overwrite: true + file_glob: true \ No newline at end of file From 434483040790829cff4945a8ed7f9cafbc15d5f7 Mon Sep 17 00:00:00 2001 From: Harvey Maunders Date: Wed, 12 Feb 2025 11:24:39 +0000 Subject: [PATCH 2/2] Include different java rest templates --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d3b067..8297691 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,7 @@ jobs: matrix: language: [java, python] type: [rest, websockets] + sub-type: [rest-okhttp, rest-retrofit] steps: # Step 1: Checkout the repository - name: Checkout repository @@ -22,8 +23,13 @@ jobs: - name: Create ZIP archive run: | mkdir -p artifacts - cd client-samples/${{ matrix.language }}/${{ matrix.type }} - zip -r ../../../artifacts/${{ matrix.language }}-${{ matrix.type }}.zip . + if [ ${{ matrix.language }} == "java" ]; then + cd client-samples/${{ matrix.language }}/${{ matrix.type }}/${{ matrix.sub-type }} + zip -r ../../../../artifacts/${{ matrix.language }}-${{ matrix.sub-type }}.zip . + else + cd client-samples/${{ matrix.language }}/${{ matrix.type }} + zip -r ../../../artifacts/${{ matrix.language }}-${{ matrix.type }}.zip . + fi # Step 3: Upload binaries to release - name: Upload binaries to release