Skip to content

Merge pull request #31 from rwth-iat/monsieuremre-patch-2 #49

Merge pull request #31 from rwth-iat/monsieuremre-patch-2

Merge pull request #31 from rwth-iat/monsieuremre-patch-2 #49

name: Create release on push to master
on:
push:
branches:
- master
jobs:
createrelease:
name: Create Release
runs-on: [ubuntu-latest]
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_id }}
release_name: Release ${{ github.event.repository.updated_at}} ${{ github.ref_name }}
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt
build:
name: Build packages
needs: createrelease
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-14
TARGET: macos
CMD_BUILD: >
pyinstaller aas_manager.spec &&
cp -r basyx dist/AAS_Manager/basyx &&
cd dist/ &&
zip -r AAS_Manager_MacOS_M1.zip AAS_Manager
OUT_FILE_NAME: AAS_Manager_MacOS_M1.zip
ASSET_MIME: application/zip
- os: macos-12
TARGET: macos
CMD_BUILD: >
pyinstaller aas_manager.spec &&
cp -r basyx dist/AAS_Manager/basyx &&
cd dist/ &&
zip -r AAS_Manager_MacOS_x86.zip AAS_Manager
OUT_FILE_NAME: AAS_Manager_MacOS_x86.zip
ASSET_MIME: application/zip
- os: ubuntu-latest
TARGET: ubuntu
CMD_BUILD: >
pyinstaller aas_manager.spec &&
cp -r basyx dist/AAS_Manager/basyx &&
cd dist/ &&
zip -r AAS_Manager_Linux.zip AAS_Manager
OUT_FILE_NAME: AAS_Manager_Linux.zip
ASSET_MIME: application/zip
- os: windows-latest
TARGET: windows
CMD_BUILD: |
pyinstaller aas_manager.spec
xcopy /E /I basyx dist\AAS_Manager\basyx
cd dist
7z a AAS_Manager_Win.zip AAS_Manager
OUT_FILE_NAME: AAS_Manager_Win.zip
ASSET_MIME: application/vnd.microsoft.portable-executable
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -e .
- name: Build with pyinstaller for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}
- name: Load Release URL File from release job
uses: actions/download-artifact@v1
with:
name: release_url
- name: Get Release File Name & Upload URL
id: get_release_info
shell: bash
run: |
value=`cat release_url/release_url.txt`
echo ::set-output name=upload_url::$value
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ./dist/${{ matrix.OUT_FILE_NAME}}
asset_name: ${{ matrix.OUT_FILE_NAME}}
asset_content_type: ${{ matrix.ASSET_MIME}}