Okay
This commit is contained in:
parent
b4f02fddfe
commit
0fafb1ac0e
2 changed files with 28 additions and 29 deletions
49
.github/workflows/build-macos.yml
vendored
49
.github/workflows/build-macos.yml
vendored
|
@ -43,6 +43,22 @@ jobs:
|
||||||
python3 -m pip install --upgrade castlabs-evs
|
python3 -m pip install --upgrade castlabs-evs
|
||||||
python3 -m castlabs_evs.account refresh -A ${{ secrets.EVS_ACCOUNT_NAME }} -P ${{ secrets.EVS_PASSWD }}
|
python3 -m castlabs_evs.account refresh -A ${{ secrets.EVS_ACCOUNT_NAME }} -P ${{ secrets.EVS_PASSWD }}
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
xcodebuild -version
|
||||||
|
brew install autoconf automake libtool
|
||||||
|
|
||||||
|
- name: Install Node Modules
|
||||||
|
run: |
|
||||||
|
yarn install
|
||||||
|
cp resources/verror-types node_modules/@types/verror/index.d.ts
|
||||||
|
cp resources/macPackager.js node_modules/app-builder-lib/out/macPackager.js
|
||||||
|
rm -r node_modules/pouchdb-node/node_modules/leveldown
|
||||||
|
rm -r node_modules/pouchdb-adapter-leveldb/node_modules/leveldown
|
||||||
|
rm -r /node_modules/leveldown/node_modules/node-gyp-build || true
|
||||||
|
|
||||||
|
|
||||||
|
# Build the DMG
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||||
|
@ -53,20 +69,9 @@ jobs:
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLEIDPASS }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLEIDPASS }}
|
||||||
PSC_NAME: ${{ secrets.PSC_NAME }}
|
PSC_NAME: ${{ secrets.PSC_NAME }}
|
||||||
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
|
||||||
run: |
|
run: yarn dist:universalNotWorking -p never
|
||||||
rm cider-yarn.lock || true
|
|
||||||
xcodebuild -version
|
|
||||||
brew install autoconf automake libtool
|
|
||||||
yarn install
|
|
||||||
cp resources/verror-types node_modules/@types/verror/index.d.ts
|
|
||||||
cp resources/macPackager.js node_modules/app-builder-lib/out/macPackager.js
|
|
||||||
rm -r node_modules/pouchdb-node/node_modules/leveldown
|
|
||||||
rm -r node_modules/pouchdb-adapter-leveldb/node_modules/leveldown
|
|
||||||
rm -r /node_modules/leveldown/node_modules/node-gyp-build || true
|
|
||||||
yarn dist:universalNotWorking -p never
|
|
||||||
ls
|
|
||||||
|
|
||||||
- name: Add license to dmg
|
- name: Add license to DMG
|
||||||
run: |
|
run: |
|
||||||
npx dmg-license resources/license.json dist/*.dmg
|
npx dmg-license resources/license.json dist/*.dmg
|
||||||
|
|
||||||
|
@ -76,7 +81,7 @@ jobs:
|
||||||
p12-file-base64: ${{ secrets.CSC_LINK }}
|
p12-file-base64: ${{ secrets.CSC_LINK }}
|
||||||
p12-password: ${{ secrets.CSC_KEY_PASSWORD }}
|
p12-password: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||||
|
|
||||||
# Makes the PKG
|
# Build to PKG
|
||||||
- name: Create PKG manually
|
- name: Create PKG manually
|
||||||
env:
|
env:
|
||||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||||
|
@ -84,22 +89,16 @@ jobs:
|
||||||
APPLEID: ${{ secrets.APPLEID }}
|
APPLEID: ${{ secrets.APPLEID }}
|
||||||
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
|
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
|
||||||
run: |
|
run: |
|
||||||
pkgbuild --component dist/mac-universal/Cider.app --install-location /Applications dist/Cider.pkg --sign ${{ secrets.PSC_NAME }}
|
pkgbuild --component dist/mac-universal/Cider.app --install-location /Applications dist/Cider-$APP_VERSION-universal.pkg --sign ${{ secrets.PSC_NAME }}
|
||||||
xcrun altool --notarize-app --primary-bundle-id com.ciderapp.cider -f dist/Cider.pkg --username ${{ secrets.APPLEID }} --password ${{ secrets.APPLEIDPASS }}
|
xcrun altool --notarize-app --primary-bundle-id com.ciderapp.cider -f dist/Cider*.pkg --username ${{ secrets.APPLEID }} --password ${{ secrets.APPLEIDPASS }}
|
||||||
sleep 5m
|
sleep 5m
|
||||||
xcrun stapler staple dist/Cider.pkg || true
|
xcrun stapler staple dist/Cider*.pkg || true
|
||||||
mv dist/*.dmg dist/Cider.dmg
|
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v2.2.3
|
uses: actions/upload-artifact@v2.2.3
|
||||||
with:
|
with:
|
||||||
# Artifact name
|
name: Cider-macOS-$APP_VERSION
|
||||||
name: macOS
|
path: dist/*
|
||||||
# A file, directory or wildcard pattern that describes what to upload
|
|
||||||
path: |
|
|
||||||
dist/*.dmg
|
|
||||||
dist/*.pkg
|
|
||||||
# The desired behavior if no files are found using the provided path.
|
|
||||||
|
|
||||||
# - name: Upload Artifacts to Latest Release
|
# - name: Upload Artifacts to Latest Release
|
||||||
# uses: softprops/action-gh-release@v1
|
# uses: softprops/action-gh-release@v1
|
||||||
|
|
|
@ -27,10 +27,10 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make it a environment variable
|
# Make it a environment variable
|
||||||
if [[ -z "${GITHUB_ENV}" ]]; then
|
if [[ -z "${GITHUB_REF}" ]]; then
|
||||||
echo "APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$GITHUB_ENV
|
echo "APP_VERSION=$(node -p -e 'require("./package.json").version')" >> $GITHUB_ENV
|
||||||
elif [[ -z "${BASH_ENV}" ]]; then
|
else
|
||||||
echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV
|
echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >> $BASH_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
node -p -e "require('./package.json').version"
|
node -p -e "require('./package.json').version"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue