summaryrefslogtreecommitdiff
path: root/.github/workflows/macos.yml
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-06-15 21:57:30 -0700
committerGitHub <noreply@github.com>2022-06-15 21:57:30 -0700
commitf5c81d869b48f8fa22a4c9b028a7d694d70b7291 (patch)
tree4122cb5625760be6f6a260e3ac5bdcc41db7354e /.github/workflows/macos.yml
parentc8dc01436473ff2eb4ab4f219804d474720b02fe (diff)
Add signing to Macos release workflow. (#2285)
* Update macos workflow * Fetch submodule * fix Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to '.github/workflows/macos.yml')
-rw-r--r--.github/workflows/macos.yml59
1 files changed, 24 insertions, 35 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index d14c25c2f..e9e7a7dbf 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -7,9 +7,8 @@ on:
branches: [ master ]
jobs:
- build_with_signing:
+ build:
name: MacOS Build CI
-
runs-on: macos-latest
strategy:
@@ -23,51 +22,41 @@ jobs:
with:
submodules: 'true'
fetch-depth: '0'
- - name: Install the Apple certificate and provisioning profile
- env:
- BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
- P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
- BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
- KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
- run: |
- # create variables
- CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
- PP_PATH=$RUNNER_TEMP/build_pp.provisionprofile
- KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
-
- # import certificate and provisioning profile from secrets
- echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
- echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
-
- # create temporary keychain
- security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
- security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
- security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
-
- # import certificate to keychain
- security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
- security list-keychain -d user -s $KEYCHAIN_PATH
-
- # apply provisioning profile
- mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
- cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: build
- run:
+ run: |
CC=${{matrix.compiler}}
CONFIGURATION=${{matrix.configuration}}
ARCH=${{matrix.platform}}
source ./github_macos_build.sh
+ - name: Package
+ id: package
+ run: |
+ export SLANG_OS_NAME=macos
+ export SLANG_ARCH_NAME=`uname -p`
+ export TAG_NAME=`git describe --tags`
+ export SLANG_TAG=${TAG_NAME#v}
+ echo "tag:$TAG_NAME"
+ echo "slang-tag:$SLANG_TAG"
+ export SLANG_BINARY_ARCHIVE=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}.zip
+ echo "creating zip"
+ 7z a ${SLANG_BINARY_ARCHIVE} slang.h
+ 7z a ${SLANG_BINARY_ARCHIVE} slang-com-helper.h
+ 7z a ${SLANG_BINARY_ARCHIVE} slang-com-ptr.h
+ 7z a ${SLANG_BINARY_ARCHIVE} slang-tag-version.h
+ 7z a ${SLANG_BINARY_ARCHIVE} prelude/*.h
+ 7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/libslang.dylib
+ 7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/slangc
+ 7z a ${SLANG_BINARY_ARCHIVE} bin/*/*/slangd
+ 7z a ${SLANG_BINARY_ARCHIVE} docs/*.md
+ echo "::set-output name=SLANG_BINARY_ARCHIVE::${SLANG_BINARY_ARCHIVE}"
- uses: actions/upload-artifact@v3
with:
name: slang-build-${{matrix.configuration}}-${{matrix.platform}}-${{matrix.compiler}}
path: |
- bin/**/slangc
- bin/**/slangd
- bin/**/libslang.dylib
+ ${{ steps.package.outputs.SLANG_BINARY_ARCHIVE }}
- name: test
run:
CONFIGURATION=${{matrix.configuration}}
CC=${{matrix.compiler}}
ARCH=${{matrix.platform}}
source ./github_test.sh
-