fix #532
This file contains 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
# https://hackernoon.com/the-only-sane-way-to-setup-fastlane-on-a-mac-4a14cb8549c8 | |
on: push | |
name: Eas | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
NODE_VERSION: 16.13.2 | |
EXPO_SDK_VERSION: 46.0.0 | |
EXPO_CLI_VERSION: 6.0.2 | |
SECRETHUB_CREDENTIAL: ${{ secrets.SECRETHUB_AOE2COMPANION_CREDENTIAL }} | |
jobs: | |
# onepassword: | |
# name: One Password | |
# runs-on: ubuntu-18.04 | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v1 | |
# - run: wget "https://cache.agilebits.com/dist/1P/op2/pkg/v2.4.1/op_linux_amd64_v2.4.1.zip" -O op.zip && unzip -d op op.zip && sudo mv op/op /usr/local/bin && rm -r op.zip op | |
# - run: echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
# - run: echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
# - run: op --version | |
# - run: | | |
# eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
# op read op://aoe2companion/expo_token/password | |
## - run: brew install --cask 1password/tap/1password-cli | |
publish: | |
name: Publish | |
runs-on: ubuntu-18.04 | |
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/aoe4-v')) && (contains(github.ref, '.0') && !contains(github.ref, '.0.0')) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Env | |
uses: ./.github/actions/setup | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Setup Secrets | |
run: | | |
wget "https://cache.agilebits.com/dist/1P/op2/pkg/v2.4.1/op_linux_amd64_v2.4.1.zip" -O op.zip && unzip -d op op.zip && sudo mv op/op /usr/local/bin && rm -r op.zip op | |
echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
- name: Set Secrets | |
run: | | |
eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
echo "SENTRY_AUTH_TOKEN=$(op read op://aoe2companion/sentry_auth_token/password)" >> $GITHUB_ENV | |
echo "EXPO_TOKEN=$(op read op://aoe2companion/expo_token/password)" >> $GITHUB_ENV | |
- run: yarn | |
- run: echo "APP=$(node deploy/script/aoe-from-tag.js $TRAVIS_BRANCH)" >> $GITHUB_ENV | |
- run: echo "VERSION=$(node deploy/script/version-from-tag.js $TRAVIS_BRANCH)" >> $GITHUB_ENV | |
- run: echo $VERSION | |
# - run: cp ./node_modules/hermes-engine/linux64-bin/hermesc ./node_modules/react-native/sdks/hermesc/linux64-bin/hermesc | |
- run: ls -al ./node_modules/hermes-engine/linux64-bin/hermesc | |
- run: ls -al ./node_modules/react-native/sdks/hermesc/linux64-bin/hermesc | |
- run: npx eas update --branch production --message "Update $VERSION" | |
build-android-internal: | |
name: Build Android Internal | |
runs-on: ubuntu-18.04 | |
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/aoe4-v')) && contains(github.ref, '.0') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Env | |
uses: ./.github/actions/setup | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Setup Secrets | |
run: | | |
wget "https://cache.agilebits.com/dist/1P/op2/pkg/v2.4.1/op_linux_amd64_v2.4.1.zip" -O op.zip && unzip -d op op.zip && sudo mv op/op /usr/local/bin && rm -r op.zip op | |
echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
- name: Set Secrets | |
run: | | |
eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
echo "EXPO_TOKEN=$(op read op://aoe2companion/expo_token/password)" >> $GITHUB_ENV | |
- run: yarn | |
- run: npx eas build --profile internal-${AOE} --platform android --local --non-interactive | |
- run: mv build-*.apk ${AOE}companion-internal-$TRAVIS_COMMIT.apk | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.AOE }}companion-internal-${{ env.TRAVIS_COMMIT }}.apk | |
path: ${{ env.AOE }}companion-internal-${{ env.TRAVIS_COMMIT }}.apk | |
build-android-development: | |
name: Build Android Development | |
runs-on: ubuntu-18.04 | |
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/aoe4-v')) && contains(github.ref, '.0') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Env | |
uses: ./.github/actions/setup | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Setup Secrets | |
run: | | |
wget "https://cache.agilebits.com/dist/1P/op2/pkg/v2.4.1/op_linux_amd64_v2.4.1.zip" -O op.zip && unzip -d op op.zip && sudo mv op/op /usr/local/bin && rm -r op.zip op | |
echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
- name: Set Secrets | |
run: | | |
eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
echo "EXPO_TOKEN=$(op read op://aoe2companion/expo_token/password)" >> $GITHUB_ENV | |
- run: yarn | |
- run: npx eas build --profile development-${AOE} --platform android --local --non-interactive | |
- run: mv build-*.apk ${AOE}companion-development-$TRAVIS_COMMIT.apk | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.AOE }}companion-development-${{ env.TRAVIS_COMMIT }}.apk | |
path: ${{ env.AOE }}companion-development-${{ env.TRAVIS_COMMIT }}.apk | |
build-android-production: | |
name: Build Android Production | |
runs-on: ubuntu-18.04 | |
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/aoe4-v')) && contains(github.ref, '.0') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Env | |
uses: ./.github/actions/setup | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Setup Secrets | |
run: | | |
wget "https://cache.agilebits.com/dist/1P/op2/pkg/v2.4.1/op_linux_amd64_v2.4.1.zip" -O op.zip && unzip -d op op.zip && sudo mv op/op /usr/local/bin && rm -r op.zip op | |
echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
- name: Set Secrets | |
run: | | |
eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
echo "EXPO_TOKEN=$(op read op://aoe2companion/expo_token/password)" >> $GITHUB_ENV | |
- run: yarn | |
- run: npx eas build --profile production-${AOE} --platform android --local --non-interactive | |
- run: mv build-*.aab ${AOE}companion-production-$TRAVIS_COMMIT.aab | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.AOE }}companion-production-${{ env.TRAVIS_COMMIT }}.aab | |
path: ${{ env.AOE }}companion-production-${{ env.TRAVIS_COMMIT }}.aab | |
build-ios-production: | |
name: Build iOS Production | |
runs-on: macos-12 | |
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/aoe4-v')) && contains(github.ref, '.0') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Env | |
uses: ./.github/actions/setup | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Setup Secrets | |
run: | | |
brew install --cask 1password/tap/1password-cli | |
echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
- name: Set Secrets | |
run: | | |
eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
echo "EXPO_TOKEN=$(op read op://aoe2companion/expo_token/password)" >> $GITHUB_ENV | |
- run: yarn | |
- run: npx eas build --profile production-${AOE} --platform ios --local --non-interactive | |
- run: mv build-*.ipa ${AOE}companion-production-$TRAVIS_COMMIT.ipa | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.AOE }}companion-production-${{ env.TRAVIS_COMMIT }}.ipa | |
path: ${{ env.AOE }}companion-production-${{ env.TRAVIS_COMMIT }}.ipa | |
build-ios-development: | |
name: Build iOS Development | |
runs-on: macos-12 | |
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/aoe4-v')) && contains(github.ref, '.0') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Env | |
uses: ./.github/actions/setup | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Setup Secrets | |
run: | | |
brew install --cask 1password/tap/1password-cli | |
echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
- name: Set Secrets | |
run: | | |
eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
echo "EXPO_TOKEN=$(op read op://aoe2companion/expo_token/password)" >> $GITHUB_ENV | |
- run: yarn | |
- run: npx eas build --profile development-simulator-${AOE} --platform ios --local --non-interactive | |
- run: mv build-*.tar.gz ${AOE}companion-development-$TRAVIS_COMMIT.tar.gz | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.AOE }}companion-development-${{ env.TRAVIS_COMMIT }}.tar.gz | |
path: ${{ env.AOE }}companion-development-${{ env.TRAVIS_COMMIT }}.tar.gz | |
deploy-android-production: | |
name: Deploy Android Production | |
runs-on: ubuntu-18.04 | |
needs: [build-android-production] | |
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/aoe4-v')) && contains(github.ref, '.0.0') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Env | |
uses: ./.github/actions/setup | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Setup Secrets | |
run: | | |
wget "https://cache.agilebits.com/dist/1P/op2/pkg/v2.4.1/op_linux_amd64_v2.4.1.zip" -O op.zip && unzip -d op op.zip && sudo mv op/op /usr/local/bin && rm -r op.zip op | |
echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
- name: Set Secrets | |
run: | | |
eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
echo "EXPO_TOKEN=$(op read op://aoe2companion/expo_token/password)" >> $GITHUB_ENV | |
echo "FASTLANE_SERVICE_ACCOUNT_BASE64=$(op read op://aoe2companion/fastlane_service_account_base64/password)" >> $GITHUB_ENV | |
- name: Download Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ env.AOE }}companion-production-${{ env.TRAVIS_COMMIT }}.aab | |
- run: echo $FASTLANE_SERVICE_ACCOUNT_BASE64 | base64 --decode > play-store-service-account.json | |
- run: yarn | |
- run: npx eas submit --profile production-${AOE} -p android --non-interactive --path ${AOE}companion-production-$TRAVIS_COMMIT.aab | |
deploy-ios-production: | |
name: Deploy iOS Production | |
runs-on: ubuntu-18.04 | |
needs: [build-ios-production] | |
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/aoe4-v')) && contains(github.ref, '.0.0') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Env | |
uses: ./.github/actions/setup | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Setup Secrets | |
run: | | |
wget "https://cache.agilebits.com/dist/1P/op2/pkg/v2.4.1/op_linux_amd64_v2.4.1.zip" -O op.zip && unzip -d op op.zip && sudo mv op/op /usr/local/bin && rm -r op.zip op | |
echo "OP_DEVICE=gpz56tma3262vu3z2thwwm57ga" >> $GITHUB_ENV | |
echo "OP_SECRET_KEY=${{ secrets.ONE_PASSWORD_SECRET_KEY }}" >> $GITHUB_ENV | |
- name: Set Secrets | |
run: | | |
eval $(printf ${{ secrets.ONE_PASSWORD_PASSWORD }} | op account add --address ${{ secrets.ONE_PASSWORD_ADDRESS }} --email ${{ secrets.ONE_PASSWORD_EMAIL }} --signin) | |
echo "EXPO_TOKEN=$(op read op://aoe2companion/expo_token/password)" >> $GITHUB_ENV | |
echo "EXPO_APPLE_ID=$(op read op://aoe2companion/expo_apple_id/password)" >> $GITHUB_ENV | |
echo "EXPO_APPLE_AUTH_KEY_P8_BASE64=$(op read op://aoe2companion/expo_apple_auth_key_p8_base64/password)" >> $GITHUB_ENV | |
- name: Download Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ env.AOE }}companion-production-${{ env.TRAVIS_COMMIT }}.ipa | |
- run: echo $EXPO_APPLE_AUTH_KEY_P8_BASE64 | base64 --decode > auth_key.p8 | |
- run: yarn | |
- run: npx eas submit --profile production-${AOE} -p ios --non-interactive --path ${AOE}companion-production-$TRAVIS_COMMIT.ipa | |