summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-05-27 16:41:06 +0300
committerПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-05-27 16:41:06 +0300
commit6605f8089d36b0c9f19b03527db0d6b38bdb2283 (patch)
tree634a06fa0ec1406d596373d55978555feca8241b /.github/workflows
parent39ffdf8ea4c96a0971b72108dbe0f49ab528e1b4 (diff)
Add the build with pyinstaller on release pipeline
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build-on-release.yml69
1 files changed, 69 insertions, 0 deletions
diff --git a/.github/workflows/build-on-release.yml b/.github/workflows/build-on-release.yml
new file mode 100644
index 0000000..26b2c55
--- /dev/null
+++ b/.github/workflows/build-on-release.yml
@@ -0,0 +1,69 @@
+name: Build and Release
+
+on:
+ release:
+ types: [created]
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macos-latest]
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.x'
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+ pip install pyinstaller
+
+ - name: Install dependancies (Linux)
+ if: matrix.os == 'ubuntu-latest'
+ run: |
+ apt-get install -y binutils
+
+ - name: Build with PyInstaller
+ run: |
+ pyinstaller krr.py
+
+ - name: Sign the application
+ run: |
+ echo "${{ secrets.APPLE_DEV_PASSWORD }}" | xcrun altool --store-password-in-keychain-item "AC_PASSWORD"
+ codesign --force --options runtime --sign "Developer ID Application: pavel@robusta.dev" dist/your_script
+
+ # - name: Sign the application (macOS)
+ # if: matrix.os == 'macos-latest'
+ # run: |
+ # security create-keychain -p "" build
+ # security import ./cert.p12 -k build -P ${{ secrets.CERT_PASSWORD }} -T /usr/bin/codesign
+ # security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k build build
+ # codesign -s "Developer ID Application: Your Name (XXXXXX)" --timestamp --options runtime ./dist/krr/krr
+
+ - name: Sign the application
+ if: matrix.os == 'macos-latest'
+ run: |
+ echo "${{ secrets.APPLE_DEV_PASSWORD }}" | xcrun altool --store-password-in-keychain-item "AC_PASSWORD"
+ codesign --force --options runtime --sign "Developer ID Application: pavel@robusta.dev" dist/krr/krr
+
+ - name: Zip the application
+ run: |
+ zip -r krr-${{ matrix.os }}-${{ github.ref_name }}.zip dist/krr
+
+ - name: Upload Release Asset
+ uses: actions/upload-release-asset@v1.0.2
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ github.event.release.upload_url }}
+ asset_path: .
+ asset_name: krr-${{ matrix.os }}-${{ github.ref_name }}.zip
+ asset_content_type: application/octet-stream