Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Release Created

Release Created #15

Workflow file for this run

name: Release Created
on:
release:
types:
- created
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: runbooksolutions/agent:latest, runbooksolutions/agent:${{ github.event.release.tag_name }}
pyinstaller-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
output: RBSAgent-windows
- os: ubuntu-latest
output: RBSAgent-linux
- os: macos-latest
output: RBSAgent-mac
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and Publish Executable
uses: sayyid5416/pyinstaller@v1
with:
python_ver: '3.9' # Adjust the Python version as needed
spec: 'app.py' # Adjust the path to your .spec or .py file
requirements: 'requirements.txt' # Adjust the path to your requirements.txt file
upload_exe_with_name: ${{matrix.output}} # Adjust the desired artifact name
options: --onefile, --name "RBSAgent", --windowed
upload-release-assets:
permissions: write-all
runs-on: ubuntu-latest
needs: [pyinstaller-build]
steps:
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -alR
# - name: Zip MacOS output
# run: |
# zip -r9 RBSAgent RBSAgent.app/
# mv RBSAgent.zip RBSAgent.app.zip
# mv ./RBSAgent.exe/RBSAgent.exe ./
# - name: Display structure of downloaded files
# run: ls -alR
# - uses: shogo82148/actions-upload-release-asset@v1
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./RBSAgent*
# overwrite: true
# - name: Upload Release Asset Windows
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./RBSAgent.exe/RBSAgent.exe
# asset_name: RBSAgent.exe
# asset_content_type: application/vnd.microsoft.portable-executable
# - name: Upload Release Asset Linux
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./RBSAgent/RBSAgent
# asset_name: RBSAgent
# asset_content_type: application/x-executable
# - name: Upload Release Asset Mac
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./RBSAgent.app.zip
# asset_name: RBSAgent
# asset_content_type: application/zip