Merge pull request #512 from JoCat/dev

[FIX] GitHub Actions
This commit is contained in:
Gravit 2021-09-01 17:57:37 +07:00 committed by GitHub
commit 438b62b3ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,5 @@
name: push name: push
on: on: push
push:
jobs: jobs:
launcher: launcher:
name: Launcher name: Launcher
@ -49,26 +48,30 @@ jobs:
name: Launcher name: Launcher
path: artifacts path: artifacts
- name: Get version value, set to env
if: startsWith(github.event.ref, 'refs/tags')
run: echo "LAUNCHER_VERSION=$(echo ${{ github.event.ref }} | awk -F\/ '{print $3}')" >> $GITHUB_ENV
- name: Create release - name: Create release
id: create_release id: create_release
uses: actions/create-release@v1 uses: actions/create-release@v1
if: github.event.ref == 'refs/tags/*' if: startsWith(github.event.ref, 'refs/tags')
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: GravitLauncher ${{ github.ref }} release_name: GravitLauncher ${{ env.LAUNCHER_VERSION }}
draft: false draft: false
prerelease: false prerelease: false
- name: Pack release - name: Pack release
if: github.event.ref == 'refs/tags/*' if: startsWith(github.event.ref, 'refs/tags')
run: | run: |
cd artifacts/ cd artifacts/
zip -r -9 ../Release.zip * zip -r -9 ../Release.zip *
- name: Upload release - name: Upload release
if: github.event.ref == 'refs/tags/*' if: startsWith(github.event.ref, 'refs/tags')
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}