Skip to content

Commit bb7ff05

Browse files
committed
Update GitHub Action
1 parent 376fd83 commit bb7ff05

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,9 @@ jobs:
2828
with:
2929
distribution: 'temurin'
3030
java-version: '25'
31-
- name: Install jq
32-
run: sudo apt-get install -y jq
33-
- name: Fetch build information
34-
run: |
35-
case $HMCL_UPDATE_CHANNEL in
36-
dev) wget -O ci.json https://ci.huangyuhui.net/job/HMCL/lastSuccessfulBuild/api/json;;
37-
stable) wget -O ci.json https://ci.huangyuhui.net/job/HMCL-stable/lastSuccessfulBuild/api/json;;
38-
*)
39-
echo "Unknown channel: $HMCL_UPDATE_CHANNEL" >&2
40-
exit 1
41-
;;
42-
esac
43-
44-
export HMCL_EXE_FILE_NAME=`cat ci.json | jq -M -r '.artifacts[] | select(.fileName | endswith(".exe")) | .fileName'`
45-
export HMCL_CI_BUILD_NUMBER=`cat ci.json | jq -M -r '.actions[] | select(._class == "hudson.plugins.git.util.BuildData") | .buildsByBranchName | .[] | .buildNumber' | sort -n --reverse | head -n 1`
46-
./scripts/run-script.sh ParseVersion "$HMCL_EXE_FILE_NAME"
47-
- name: Check for existing version
48-
run: ./scripts/run-script.sh CheckExistingVersion
4931
- name: Publish to Maven Central
5032
if: ${{ env.need_update == 'true' }}
51-
run: ./gradlew --no-daemon --info publishToSonatype closeAndReleaseSonatypeStagingRepository
33+
run: ./gradlew --no-daemon --info checkExisting publishToSonatype closeAndReleaseSonatypeStagingRepository -Phmcl.channel=$HMCL_UPDATE_CHANNEL
5234
env:
5335
SIGNING_KEY_ID: ${{ secrets.signingKeyId }}
5436
SIGNING_PASSWORD: ${{ secrets.signingPassword }}

0 commit comments

Comments
 (0)