# This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Nightly Release on: schedule: - cron: '0 5 * * *' workflow_dispatch: jobs: windows-build: runs-on: 7950X strategy: fail-fast: false matrix: python-version: ["3.11"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Compute version shell: powershell run: | $package_version = $(Get-Date -UFormat "%Y%m%d")+"."+${{ github.run_number }} $package_version_ = $(Get-Date -UFormat "%Y%m%d")+"_"+${{ github.run_number }} $tag_name=$package_version echo "package_version=$package_version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append echo "package_version_=$package_version_" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append echo "tag_name=$tag_name" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - name: Create Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.NODAI_INVOCATION_TOKEN }} with: tag_name: ${{ env.tag_name }} release_name: nod.ai SHARK ${{ env.tag_name }} body: | Automatic snapshot release of nod.ai SHARK. draft: true prerelease: true - name: Build Package shell: powershell run: | ./setup_venv.ps1 python process_skipfiles.py $env:SHARK_PACKAGE_VERSION=${{ env.package_version }} pip install -e . pip freeze -l pyinstaller .\apps\shark_studio\shark_studio.spec mv ./dist/nodai_shark_studio.exe ./dist/nodai_shark_studio_${{ env.package_version_ }}.exe signtool sign /f c:\g\shark_02152023.cer /fd certHash /csp "eToken Base Cryptographic Provider" /k "${{ secrets.CI_CERT }}" ./dist/nodai_shark_studio_${{ env.package_version_ }}.exe - name: Upload Release Assets id: upload-release-assets uses: dwenegar/upload-release-assets@v1 env: GITHUB_TOKEN: ${{ secrets.NODAI_INVOCATION_TOKEN }} with: release_id: ${{ steps.create_release.outputs.id }} assets_path: ./dist/nodai* #asset_content_type: application/vnd.microsoft.portable-executable - name: Publish Release id: publish_release uses: eregon/publish-release@v1 env: GITHUB_TOKEN: ${{ secrets.NODAI_INVOCATION_TOKEN }} with: release_id: ${{ steps.create_release.outputs.id }}