This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
Release Created #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.exe | |
- os: ubuntu-latest | |
output: RBSAgent | |
- os: macos-latest | |
output: RBSAgent.app | |
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: | |
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.app | |
- name: Display structure of downloaded files | |
run: ls -alR | |
- 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 |