Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zj/GitHub action 0724 #257

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/maven_deploy_snapshot_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ jobs:
currentVersionWithoutSnapshot=${currentVersion%-SNAPSHOT}
newVersion="${currentVersionWithoutSnapshot}-$SUFFIX-SNAPSHOT"
mvn versions:set -DnewVersion=$newVersion --batch-mode
BRANCH_NAME=${{ github.ref }}
REPO_OWNER="eclipse-serializer"
REPO_NAME="serializer"
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/branches/$BRANCH_NAME)
if [ $RESPONSE -eq 200 ]; then
mvn versions:set-property -Dproperty=eclipse.serializer.version -DnewVersion=$newVersion
else
echo "Branch does not exist in serializer repository, skipping serializer version change"
fi
- name: Make a snapshot
run: mvn -Pdeploy -Pproduction --no-transfer-progress --batch-mode clean deploy -U
env:
Expand Down Expand Up @@ -83,7 +92,7 @@ jobs:
fi
local hashFromContent=$(echo -n "$branch" | md5sum | cut -f1 -d" ")
echo "${result}-${hashFromContent:0:10}"
}
}
suffix=$(prepareSuffix ${GITHUB_REF#refs/heads/})
echo "Suffix: $suffix"
echo "SUFFIX=$suffix" >> $GITHUB_ENV
Expand All @@ -93,6 +102,15 @@ jobs:
currentVersionWithoutSnapshot=${currentVersion%-SNAPSHOT}
newVersion="${currentVersionWithoutSnapshot}-$SUFFIX-SNAPSHOT"
mvn versions:set -DnewVersion=$newVersion --batch-mode
BRANCH_NAME=${{ github.ref }}
REPO_OWNER="eclipse-serializer"
REPO_NAME="serializer"
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/branches/$BRANCH_NAME)
if [ $RESPONSE -eq 200 ]; then
mvn versions:set-property -Dproperty=eclipse.serializer.version -DnewVersion=$newVersion
else
echo "Branch does not exist in serializer repository, skipping serializer version change"
fi
- name: Make a snapshot java 17
run: |
mvn -pl integrations/spring-boot3 clean install -am -B
Expand Down
Loading