mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-18 22:13:04 +03:00
Merge pull request #513 from JoCat/dev
[FIX] GitHub Actions - Загрузка файлов в релиз
This commit is contained in:
commit
9e7dedffc9
1 changed files with 21 additions and 19 deletions
40
.github/workflows/push.yml
vendored
40
.github/workflows/push.yml
vendored
|
@ -52,31 +52,33 @@ jobs:
|
||||||
if: startsWith(github.event.ref, 'refs/tags')
|
if: startsWith(github.event.ref, 'refs/tags')
|
||||||
run: echo "LAUNCHER_VERSION=$(echo ${{ github.event.ref }} | awk -F\/ '{print $3}')" >> $GITHUB_ENV
|
run: echo "LAUNCHER_VERSION=$(echo ${{ github.event.ref }} | awk -F\/ '{print $3}')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Prebuild release files
|
||||||
|
if: startsWith(github.event.ref, 'refs/tags')
|
||||||
|
run: |
|
||||||
|
cd artifacts
|
||||||
|
zip -9 LauncherBase.zip libraries.zip LaunchServer.jar
|
||||||
|
zip -j -9 LaunchServerModules.zip ../modules/*_module/build/libs/*.jar
|
||||||
|
zip -j -9 LauncherModules.zip ../modules/*_lmodule/build/libs/*.jar
|
||||||
|
zip -j -9 ServerWrapperModules.zip ../modules/*_swmodule/build/libs/*.jar
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.event.ref, 'refs/tags')
|
if: startsWith(github.event.ref, 'refs/tags')
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# Список настроек тута: https://github.com/softprops/action-gh-release#-customizing
|
||||||
|
# Можно сделать пуш описания релиза из файла
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: GravitLauncher ${{ env.LAUNCHER_VERSION }}
|
release_name: GravitLauncher ${{ env.LAUNCHER_VERSION }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
files: |
|
||||||
- name: Pack release
|
libraries.zip
|
||||||
if: startsWith(github.event.ref, 'refs/tags')
|
LaunchServer.jar
|
||||||
run: |
|
ServerWrapper.jar
|
||||||
cd artifacts/
|
LauncherAuthlib.jar
|
||||||
zip -r -9 ../Release.zip *
|
LauncherModules.zip
|
||||||
|
LaunchServerModules.zip
|
||||||
- name: Upload release
|
ServerWrapperModules.zip
|
||||||
if: startsWith(github.event.ref, 'refs/tags')
|
LauncherBase.zip
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./Release.zip
|
|
||||||
asset_name: Release.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
Loading…
Reference in a new issue