diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae04b7b92..2973a02e6 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 b60bda951..078cc30dd 100644 --- a/clients/java/.github/workflows/release.yml +++ b/clients/java/.github/workflows/release.yml @@ -6,17 +6,36 @@ 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 + distribution: 'temurin' + cache: maven - name: Version id: version