update deps #333
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
platform: | |
description: 'Select the platform to build and publish' | |
required: true | |
default: 'all' | |
type: choice | |
options: | |
- all | |
- macos | |
- macos-arm64 | |
- windows | |
- linux | |
jobs: | |
build-expo: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' || github.event.inputs.platform == 'all' || github.event.inputs.platform == 'macos' || github.event.inputs.platform == 'macos-arm64' || github.event.inputs.platform == 'windows' || github.event.inputs.platform == 'linux' }} | |
steps: | |
- name: Check out the Monorepo repository | |
run: | | |
git clone https://github.com/wcpos/monorepo.git monorepo | |
cd monorepo | |
touch yarn.lock | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install jq | |
run: sudo apt-get install -y jq | |
- name: Add RXDB_LICENSE_KEY to package.json | |
working-directory: monorepo | |
env: | |
RXDB_LICENSE_KEY: ${{ secrets.RXDB_LICENSE_KEY }} | |
run: | | |
jq --arg license "$RXDB_LICENSE_KEY" '.accessTokens["rxdb-premium"] = $license' package.json > tmp.json && mv tmp.json package.json | |
- name: Install dependencies | |
working-directory: monorepo | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
run: | | |
yarn install | |
- name: Run Expo export | |
working-directory: monorepo | |
run: | | |
yarn managed export:electron | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: expo-dist | |
path: monorepo/apps/managed/dist | |
publish-macos: | |
needs: build-expo | |
runs-on: macos-13 | |
if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'macos' }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Download expo-dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: expo-dist | |
path: dist | |
- name: Install Node.js, NPM, and Yarn | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Python and distutils | |
run: | | |
python3 -m ensurepip | |
python3 -m pip install setuptools | |
- name: Signing By Apple Developer ID | |
uses: apple-actions/import-codesign-certs@v3 | |
with: | |
p12-file-base64: ${{ secrets.MAC_CERTS }} | |
p12-password: ${{ secrets.MAC_CERTS_PASSWORD }} | |
- name: Install and build | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
run: | | |
yarn install | |
yarn rebuild:all | |
- name: Publish MacOS x64 release | |
env: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASS }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn publish-app | |
publish-macos-arm64: | |
needs: | |
- build-expo | |
# - publish-macos | |
runs-on: macos-latest | |
if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'macos-arm64' }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Download expo-dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: expo-dist | |
path: dist | |
- name: Install Node.js, NPM, and Yarn | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Signing By Apple Developer ID | |
uses: apple-actions/import-codesign-certs@v3 | |
with: | |
p12-file-base64: ${{ secrets.MAC_CERTS }} | |
p12-password: ${{ secrets.MAC_CERTS_PASSWORD }} | |
- name: Install and build | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
run: | | |
yarn install | |
yarn rebuild:all | |
- name: Publish MacOS arm64 release | |
env: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASS }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ARCH: arm64 | |
run: | | |
yarn publish-app --arch=arm64 --platform=darwin | |
publish-windows: | |
needs: build-expo | |
runs-on: windows-latest | |
if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'windows' }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Download expo-dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: expo-dist | |
path: dist | |
- name: Install Node.js, NPM, and Yarn | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install and build | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
run: | | |
yarn install | |
yarn rebuild:all | |
- name: Publish Windows release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn publish-app | |
publish-linux: | |
needs: build-expo | |
runs-on: ubuntu-latest | |
if: ${{ github.event.inputs.platform == 'all' || github.event.inputs.platform == 'linux' }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Download expo-dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: expo-dist | |
path: dist | |
- name: Install Node.js, NPM, and Yarn | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install and build | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
run: | | |
yarn install | |
yarn rebuild:all | |
- name: Publish Linux release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
yarn publish-app |