Skip to content

Commit

Permalink
chore: cleanup and due credits
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Jun 24, 2023
1 parent 5890ecd commit ee318ed
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ updates:
- package-ecosystem: pip
directory: '/'
schedule:
interval: 'daily'
interval: 'weekly'
open-pull-requests-limit: 5
versioning-strategy: increase-if-necessary
16 changes: 15 additions & 1 deletion .github/workflows/auto-dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 BentoML Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: auto-dependabot
on:
pull_request_target:
Expand All @@ -6,7 +20,7 @@ on:
- reopened
- synchronize
branches:
- master
- main
jobs:
dependabot:
runs-on: ubuntu-latest
Expand Down
54 changes: 3 additions & 51 deletions .github/workflows/binary-releases.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# modified workflow from ofek/hatch, big kudos to them.
name: binary-distribution
on:
push:
Expand Down Expand Up @@ -227,7 +228,7 @@ jobs:
name: installers
path: installers/*
macos-packaging:
name: Build macOS installer and sign/notarize artifacts
name: Build macOS installer
if: github.event.pull_request.head.repo.full_name == github.repository
needs: binaries
runs-on: macos-12
Expand Down Expand Up @@ -257,41 +258,6 @@ jobs:
for f in archives/*; do
tar -xzf "$f" -C bin
done
# - name: Write credentials
# env:
# APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE: '${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE }}'
# APPLE_DEVELOPER_ID_APPLICATION_PRIVATE_KEY: '${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_PRIVATE_KEY }}'
# APPLE_APP_STORE_CONNECT_API_DATA: '${{ secrets.APPLE_APP_STORE_CONNECT_API_DATA }}'
# run: |-
# echo "$APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE" > /tmp/certificate.pem
# echo "$APPLE_DEVELOPER_ID_APPLICATION_PRIVATE_KEY" > /tmp/private-key.pem
# echo "$APPLE_APP_STORE_CONNECT_API_DATA" > /tmp/app-store-connect.json
# # https://developer.apple.com/documentation/security/hardened_runtime
# - name: Sign binaries
# run: |-
# for f in bin/*; do
# rcodesign sign -vv \
# --pem-source /tmp/certificate.pem \
# --pem-source /tmp/private-key.pem \
# --code-signature-flags runtime \
# "$f"
# done
# # https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution
# - name: Notarize binaries
# run: |-
# mkdir notarize-bin
#
# cd bin
# for f in *; do
# zip "../notarize-bin/$f.zip" "$f"
# done
#
# cd ../notarize-bin
# for f in *; do
# rcodesign notary-submit -vv \
# --api-key-path /tmp/app-store-connect.json \
# "$f"
# done
- name: Archive binaries
run: |-
rm archives/*
Expand All @@ -318,26 +284,16 @@ jobs:
id: stage
run: |-
mkdir staged
mkdir signed
mv build/*/release/*/*.app staged
app_bundle="$(ls staged)"
app_name="${app_bundle:0:${#app_bundle}-4}"
echo "app-bundle=$app_bundle" >> "$GITHUB_OUTPUT"
echo "app-name=$app_name-${{ env.VERSION }}.dmg" >> "$GITHUB_OUTPUT"
echo "dmg-file=$app_name-${{ env.VERSION }}.dmg" >> "$GITHUB_OUTPUT"
# - name: Sign app bundle
# run: >-
# rcodesign sign -vv --pem-source /tmp/certificate.pem --pem-source /tmp/private-key.pem "staged/${{ steps.stage.outputs.app-bundle }}" "signed/${{ steps.stage.outputs.app-bundle }}"
- name: Create DMG
run: >-
create-dmg --volname "${{ steps.stage.outputs.app-name }}" --hide-extension "${{ steps.stage.outputs.app-bundle }}" --window-pos 200 120 --window-size 800 400 --icon-size 100 --app-drop-link 600 185 "${{ steps.stage.outputs.dmg-file }}" signed
# - name: Sign DMG
# run: >-
# rcodesign sign -vv --pem-source /tmp/certificate.pem --pem-source /tmp/private-key.pem "${{ steps.stage.outputs.dmg-file }}" "${{ steps.stage.outputs.dmg-file }}"
# - name: Notarize DMG
# run: >-
# rcodesign notary-submit --api-key-path /tmp/app-store-connect.json --staple "${{ steps.stage.outputs.dmg-file }}"
create-dmg --volname "${{ steps.stage.outputs.app-name }}" --hide-extension "${{ steps.stage.outputs.app-bundle }}" --window-pos 200 120 --window-size 800 400 --icon-size 100 --app-drop-link 600 185 "${{ steps.stage.outputs.dmg-file }}" staged
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -377,10 +333,6 @@ jobs:
with:
name: installers
path: installers
- name: Push Python artifacts to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.6
with:
skip-existing: true
- name: Add assets to current release
uses: softprops/action-gh-release@v1
with:
Expand Down
14 changes: 14 additions & 0 deletions pyoxidizer.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 BentoML Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Entrypoint for using pyoxidizer to package openllm into standalone binary distribution."""

VERSION = VARS["version"]
Expand Down

0 comments on commit ee318ed

Please sign in to comment.