Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rainlizard authored Mar 19, 2024
1 parent 327e2ce commit 6539fe2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
build_application:
Expand Down Expand Up @@ -71,20 +72,18 @@ jobs:
name: unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows
path: ./bin/ExportWindows/

############# Release with workflow_dispatch #############

- name: Zip Linux Build for Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ./bin/ExportLinux/
zip -r ../Unearth-${{ steps.version_info.outputs.FULL_VERSION }}-linux.zip ./
- name: Zip Windows Build for Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ./bin/ExportWindows/
zip -r ../Unearth-${{ steps.version_info.outputs.FULL_VERSION }}-windows.zip ./
- name: Create Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -96,7 +95,7 @@ jobs:
prerelease: false

- name: Upload Zipped Linux Artifact to Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -107,7 +106,7 @@ jobs:
asset_content_type: application/zip

- name: Upload Zipped Windows Artifact to Release
if: github.event_name == 'workflow_dispatch'
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 6539fe2

Please sign in to comment.