Skip to content

Commit 73a1772

Browse files
committed
chore: automate releasing for php, js, java
1 parent 66fa046 commit 73a1772

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ jobs:
191191
git config --global user.name "Phrase"
192192
git add .
193193
git commit --message "Deploying from phrase/openapi@${GITHUB_SHA::8}"
194-
git push origin master
194+
git tag -a $PACKAGE_VERSION -m $PACKAGE_VERSION || true
195+
git push --tags origin master
195196
else
196197
echo " No changes, skipping."
197198
fi
@@ -220,7 +221,8 @@ jobs:
220221
git config --global user.name "Phrase"
221222
git add .
222223
git commit --message "Deploying from phrase/openapi@${GITHUB_SHA::8}"
223-
git push origin master
224+
git tag -a $PACKAGE_VERSION -m $PACKAGE_VERSION || true
225+
git push --tags origin master
224226
else
225227
echo " No changes, skipping."
226228
fi

clients/java/.github/workflows/release.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,36 @@ on:
66
- '*'
77

88
jobs:
9+
build:
10+
name: build
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
java: [ '8' ]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK
18+
uses: actions/setup-java@v2
19+
with:
20+
java-version: ${{ matrix.java }}
21+
distribution: 'temurin'
22+
cache: maven
23+
- name: Build with Maven
24+
run: mvn -B package --no-transfer-progress --file pom.xml
25+
926
release:
1027
runs-on: ubuntu-latest
28+
needs: build
1129
steps:
1230
-
1331
name: Checkout
14-
uses: actions/checkout@v2
32+
uses: actions/checkout@v4
1533
-
16-
name: Set up JDK 1.8
17-
uses: actions/setup-java@v1
34+
name: Set up JDK
35+
uses: actions/setup-java@v2
1836
with:
19-
java-version: 1.8
37+
distribution: 'temurin'
38+
cache: maven
2039
-
2140
name: Version
2241
id: version

0 commit comments

Comments
 (0)