add more variables and try to create a prerelease

This commit is contained in:
Erik Gomez committed 2020-06-19 16:23:04 -05:00
1 parent 49f16c10e9
commit 4b5f77616f
2 files changed
+72 -4

No files matched your search

+60 -2
View File
@@ -1,5 +1,10 @@
name: Build and upload recommended package name: Build and upload recommended package
env:
TYPE: "recommended"
DEV_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)"
PYTHON_VERSION: "3.8.3"
on: on:
pull_request: pull_request:
push: push:
@@ -11,6 +16,12 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- name: Get current time
uses: srfrnk/current-time@master
id: current-time
with:
format: MMDDYYYYHHmmss
- name: Checkout python repo - name: Checkout python repo
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -22,9 +33,56 @@ jobs:
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }} p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Run build package (recommended pkg) - name: Run build package (recommended pkg)
run: /usr/bin/sudo ./build_python_framework_pkgs.zsh recommended "$DEV_ID"
env: env:
DEV_ID: "Developer ID Installer: Clever DevOps Co. (9GQZ7KUFR6)" TIME: "${{ steps.current-time.outputs.formattedTime }}"
run: /usr/bin/sudo ./build_python_framework_pkgs.zsh "$TYPE" "$DEV_ID" "$PYTHON_VERSION" "{TIME}"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: true
- name: Upload Unsigned Package Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TIME: "${{ steps.current-time.outputs.formattedTime }}"
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./outputs/python_${{TYPE}}-${{PYTHON_VERSION}}.${{DATE}}.pkg
asset_name: python_${{TYPE}}-${{PYTHON_VERSION}}.${{DATE}}.pkg
asset_content_type: application/x-newton-compatible-pkg
- name: Upload Signed Package Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TIME: "${{ steps.current-time.outputs.formattedTime }}"
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./outputs/python_${{TYPE}}_signed-${{PYTHON_VERSION}}.${{DATE}}.pkg
asset_name: python_${{TYPE}}_signed-${{PYTHON_VERSION}}.${{DATE}}.pkg
asset_content_type: application/x-newton-compatible-pkg
- name: Upload Python Framework Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TIME: "${{ steps.current-time.outputs.formattedTime }}"
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./outputs/Python3.framework_${{TYPE}}-${{PYTHON_VERSION}}.${{DATE}}.zip
asset_name: Python3.framework_${{TYPE}}-${{PYTHON_VERSION}}.${{DATE}}.zip
asset_content_type: application/ application/zip
- name: Upload packages - name: Upload packages
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
+12 -2
View File
@@ -6,7 +6,6 @@
# Run this with your current directory being the path where this script is located # Run this with your current directory being the path where this script is located
# Harcoded versions # Harcoded versions
PYTHON_VERSION=3.8.3
RP_SHA="8bce58e91895978da6f238c1d2e1de3559ea4643" RP_SHA="8bce58e91895978da6f238c1d2e1de3559ea4643"
MP_SHA="71c57fcfdf43692adcd41fa7305be08f66bae3e5" MP_SHA="71c57fcfdf43692adcd41fa7305be08f66bae3e5"
# Hardcoded paths # Hardcoded paths
@@ -54,8 +53,19 @@ if [[ $(/usr/bin/id -u) -ne 0 ]]; then
exit 1 exit 1
fi fi
# Variables if [ -n "$3" ]; then
PYTHON_VERSION=$3
else
PYTHON_VERSION=3.8.3
fi
if [ -n "$4" ]; then
DATE=$4
else
DATE=$(/bin/date -u "+%m%d%Y%H%M%S") DATE=$(/bin/date -u "+%m%d%Y%H%M%S")
fi
# Variables
TOOLSDIR=$(dirname $0) TOOLSDIR=$(dirname $0)
OUTPUTSDIR="$TOOLSDIR/outputs" OUTPUTSDIR="$TOOLSDIR/outputs"
CONSOLEUSER=$(/usr/bin/stat -f "%Su" /dev/console) CONSOLEUSER=$(/usr/bin/stat -f "%Su" /dev/console)