Here we go again
This commit is contained in:
parent
c501a8ddb1
commit
c07ae6972e
2 changed files with 42 additions and 27 deletions
46
.github/workflows/build-macos.yml
vendored
46
.github/workflows/build-macos.yml
vendored
|
@ -13,7 +13,7 @@ name: "macOS build"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ enhancement/macosBuilds ]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'README.md'
|
- 'README.md'
|
||||||
- 'SECURITY.md'
|
- 'SECURITY.md'
|
||||||
|
@ -24,7 +24,7 @@ on:
|
||||||
- cron: '44 20 * * 1'
|
- cron: '44 20 * * 1'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
build-macos:
|
||||||
name: macOS build
|
name: macOS build
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -43,11 +43,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: maxim-lobanov/setup-xcode@v1
|
- uses: maxim-lobanov/setup-xcode@v1
|
||||||
with:
|
with:
|
||||||
xcode-version: '12.4'
|
xcode-version: '12.4'
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
@ -66,22 +66,22 @@ jobs:
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
# and modify them (or add more) to build your code if your project
|
# and modify them (or add more) to build your code if your project
|
||||||
# uses a compiled language
|
# uses a compiled language
|
||||||
|
|
||||||
# - name : env
|
# - name : env
|
||||||
# run: |
|
# run: |
|
||||||
# export EVS_ACCOUNT_NAME=${{ secrets.EVS_ACCOUNT_NAME}} && export EVS_PASSWD=${{ secrets.EVS_PASSWD }}
|
# export EVS_ACCOUNT_NAME=${{ secrets.EVS_ACCOUNT_NAME}} && export EVS_PASSWD=${{ secrets.EVS_PASSWD }}
|
||||||
# export CSC_LINK=${{ secrets.CSC_LINK }} && export CSC_KEY_PASSWORD=${{ secrets.CSC_KEY_PASSWORD }}
|
# export CSC_LINK=${{ secrets.CSC_LINK }} && export CSC_KEY_PASSWORD=${{ secrets.CSC_KEY_PASSWORD }}
|
||||||
# export APPLEID=${{ secrets.APPLEID }} && export APPLEIDPASS=${{ secrets.APPLEIDPASS }}
|
# export APPLEID=${{ secrets.APPLEID }} && export APPLEIDPASS=${{ secrets.APPLEIDPASS }}
|
||||||
|
|
||||||
- name: Sign in to EVS
|
- name: Sign in to EVS
|
||||||
run: |
|
run: |
|
||||||
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 : Build
|
- name : Build
|
||||||
env:
|
env:
|
||||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||||
APPLEID: ${{ secrets.APPLEID }}
|
APPLEID: ${{ secrets.APPLEID }}
|
||||||
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
|
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
|
||||||
APPLE_ID: ${{ secrets.APPLEID }}
|
APPLE_ID: ${{ secrets.APPLEID }}
|
||||||
|
@ -99,23 +99,25 @@ jobs:
|
||||||
rm -r node_modules/pouchdb-adapter-leveldb/node_modules/leveldown
|
rm -r node_modules/pouchdb-adapter-leveldb/node_modules/leveldown
|
||||||
rm -r /node_modules/leveldown/node_modules/node-gyp-build || true
|
rm -r /node_modules/leveldown/node_modules/node-gyp-build || true
|
||||||
yarn dist:universalNotWorking -p never
|
yarn dist:universalNotWorking -p never
|
||||||
|
ls
|
||||||
# - name: Perform CodeQL Analysis
|
# - name: Perform CodeQL Analysis
|
||||||
# uses: github/codeql-action/analyze@v1
|
# uses: github/codeql-action/analyze@v1
|
||||||
|
|
||||||
- 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
|
||||||
|
|
||||||
- name: Import
|
- name: Import
|
||||||
uses: apple-actions/import-codesign-certs@v1
|
uses: apple-actions/import-codesign-certs@v1
|
||||||
with:
|
with:
|
||||||
p12-file-base64: ${{ secrets.CSC_LINK }}
|
p12-file-base64: ${{ secrets.CSC_LINK }}
|
||||||
p12-password: ${{ secrets.CSC_KEY_PASSWORD }}
|
p12-password: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||||
|
|
||||||
- name: Create PKG manually
|
# Makes the PKG
|
||||||
env:
|
- name: Create PKG manually
|
||||||
|
env:
|
||||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||||
APPLEID: ${{ secrets.APPLEID }}
|
APPLEID: ${{ secrets.APPLEID }}
|
||||||
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
|
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -142,7 +144,7 @@ jobs:
|
||||||
dist/Cider.dmg
|
dist/Cider.dmg
|
||||||
dist/Cider.pkg
|
dist/Cider.pkg
|
||||||
body: signed Develop MacOS Builds
|
body: signed Develop MacOS Builds
|
||||||
name: macOS builds
|
name: macOS builds
|
||||||
tag_name: macos-beta
|
tag_name: macos-beta
|
||||||
target_commitish: ${{ env.GITHUB_SHA }}
|
target_commitish: ${{ env.GITHUB_SHA }}
|
||||||
prerelease: true
|
prerelease: true
|
||||||
|
|
|
@ -1,10 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
LATEST_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep '"sha"' | head -1 | cut -d '"' -f 4)
|
printenv
|
||||||
SHA_DATE=$(git show -s --format=%ci $LATEST_SHA)
|
# DEBUGGING
|
||||||
COMMITSINCESTABLE=$(git rev-list $LATEST_SHA..HEAD --count --since="$SHA_DATE")
|
LATEST_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs | cut -d' ' -f1)
|
||||||
|
echo $LATEST_SHA
|
||||||
|
COMMITSINCESTABLE=$(git rev-list $LATEST_SHA..HEAD --count)
|
||||||
|
echo $COMMITSINCESTABLE
|
||||||
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
|
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
|
||||||
if [[ $CIRCLE_BRANCH == "main" && $COMMITSINCESTABLE -gt 0 ]]; then
|
echo $CURRENT_VERSION
|
||||||
|
GITHUB_BASE_REF="main"
|
||||||
|
echo $GITHUB_BASE_REF
|
||||||
|
|
||||||
|
#############################################################################################
|
||||||
|
|
||||||
|
if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_BASE_REF == "main") && $COMMITSINCESTABLE -gt 0 ]]; then
|
||||||
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}"
|
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}"
|
||||||
else
|
else
|
||||||
NEW_VERSION=${CURRENT_VERSION/0/$COMMITSINCESTABLE}
|
NEW_VERSION=${CURRENT_VERSION/0/$COMMITSINCESTABLE}
|
||||||
|
@ -17,4 +26,8 @@ else
|
||||||
echo "Version unchanged, commits since stable is ${COMMITSINCESTABLE}"
|
echo "Version unchanged, commits since stable is ${COMMITSINCESTABLE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV
|
if [[ -z "${GITHUB_ENV}" ]]; then
|
||||||
|
echo "APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$GITHUB_ENV
|
||||||
|
elif [[ -z "${BASH_ENV}" ]]; then
|
||||||
|
echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue