Skip to content

Commit

Permalink
Some minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Becods committed Apr 14, 2024
1 parent 4dc614d commit ee453e9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,26 @@ jobs:
run:
sed -ni '/https:\/\/maven.aliyun.com\/repository\/public/{h;n;/https:\/\/repo1.maven.org\/maven2/!{:a;N;/https:\/\/maven.aliyun.com\/repository\/public/!ba;x;H;n};x;H;x};p' repositories

- name: Preprocessing Check
id: check
run: |
if git diff --name-only ${{ github.sha }} | grep -q "latest"; then
sed -i "s/plugin_version=[0-9.]*$/plugin_version=`cat latest`/g" gradle.properties
echo "release=true" >> $GITHUB_ENV;
echo "version=`cat latest`" >> $GITHUB_ENV;
else
echo "release=false" >> $GITHUB_ENV;
fi
- name: Build Dev
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
if: ${{ env.release == 'false' }}
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
arguments: ShadowJar

- name: Build Release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: ${{ env.release == 'true' }}
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
Expand All @@ -114,21 +125,16 @@ jobs:
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Rename Release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
mkdir release
mv bukkit/build/libs/MultiLogin-Bukkit-Build_*.jar release/MultiLogin-Bukkit-${{ github.ref_name }}.jar
mv bungee/build/libs/MultiLogin-Bungee-Build_*.jar release/MultiLogin-Bungee-${{ github.ref_name }}.jar
mv velocity/build/libs/MultiLogin-Velocity-Build_*.jar release/MultiLogin-Velocity-${{ github.ref_name }}.jar
- name: Publish Release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: ${{ env.release == 'true' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ github.ref_name }}"
automatic_release_tag: "${{ env.version }}"
draft: false
prerelease: false
title: "MultiLogin ${{ github.ref_name }}"
files: release/*.jar
title: "MultiLogin ${{ env.version }}"
files: |
bukkit/build/libs/MultiLogin-Bukkit-${{ env.version }}.jar
bungee/build/libs/MultiLogin-Bungee-${{ env.version }}.jar
velocity/build/libs/MultiLogin-Velocity-${{ env.version }}.jar
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ fabric/.gradle/
/api/bin
/bungee/bin
/bungee/injector/bin
/velocity/libraries/*.jar
/velocity/libraries/*
!/velocity/libraries/README.md
Empty file modified gradlew
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion latest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.7
0.6.8

0 comments on commit ee453e9

Please sign in to comment.