Skip to content

Commit

Permalink
build installer on release
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 committed Oct 29, 2024
1 parent 735ee68 commit d459bda
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build OpenELIS-Global-2 Installer
on:
workflow_dispatch:
release:
types: [published]

jobs:
check-out-and-build-installer:
build-installer-and-upload-installer:
runs-on: ubuntu-latest
steps:

Expand All @@ -18,4 +19,32 @@ jobs:

- name: check installer
run: ls OEInstaller/linux


- name: Find installer file
id: find_file
run: |
# Find the file in OEInstaller/linux with .tar.gz extension
FILE_PATH=$(find OEInstaller/linux -name "*.tar.gz" -print -quit)
if [ -z "$FILE_PATH" ]; then
echo "No .tar.gz file found in OEInstaller/linux directory."
exit 1
fi
echo "File path: $FILE_PATH"
# Extract the file name from the path
FILE_NAME=$(basename "$FILE_PATH")
echo "File name: $FILE_NAME"
# Pass the file path and name to outputs
echo "FILE_PATH=$FILE_PATH" >> $GITHUB_ENV
echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.FILE_PATH }}
asset_name: ${{ env.FILE_NAME }}
asset_content_type: application/gzip

0 comments on commit d459bda

Please sign in to comment.