From 146271ee6e1049c5dc130d6a9e45067916d6e6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Behrendt?= Date: Thu, 14 Dec 2023 15:39:37 +0100 Subject: [PATCH] chore: automate releasing for php, js, java --- .github/workflows/build.yml | 6 +++-- clients/java/.github/workflows/release.yml | 28 ++++++++++++++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae04b7b9..2973a02e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -191,7 +191,8 @@ jobs: git config --global user.name "Phrase" git add . git commit --message "Deploying from phrase/openapi@${GITHUB_SHA::8}" - git push origin master + git tag -a $PACKAGE_VERSION -m $PACKAGE_VERSION || true + git push --tags origin master else echo " No changes, skipping." fi @@ -220,7 +221,8 @@ jobs: git config --global user.name "Phrase" git add . git commit --message "Deploying from phrase/openapi@${GITHUB_SHA::8}" - git push origin master + git tag -a $PACKAGE_VERSION -m $PACKAGE_VERSION || true + git push --tags origin master else echo " No changes, skipping." fi diff --git a/clients/java/.github/workflows/release.yml b/clients/java/.github/workflows/release.yml index b60bda95..99f066da 100644 --- a/clients/java/.github/workflows/release.yml +++ b/clients/java/.github/workflows/release.yml @@ -6,17 +6,37 @@ on: - '*' jobs: + build: + name: build + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml + release: runs-on: ubuntu-latest + needs: build steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + name: Set up JDK + uses: actions/setup-java@v2 with: - java-version: 1.8 + java-version: '8' + distribution: 'temurin' + cache: maven - name: Version id: version