Skip to content

Commit

Permalink
Revert "remove local git + postinstall hooks (#3957)"
Browse files Browse the repository at this point in the history
This reverts commit 2c5d73c.
  • Loading branch information
jamesacklin committed Sep 27, 2024
1 parent ec83b2e commit 8c06ee1
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 53 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
- recursive: true
args: [--frozen-lockfile]
- name: Build packages
run: pnpm build:all

- name: Run Lint
run: pnpm -r lint

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: Build packages
run: pnpm build:all
- working-directory: ./apps/tlon-web
run: pnpm build
- uses: actions/upload-artifact@v3
Expand Down
61 changes: 29 additions & 32 deletions .github/workflows/deploy-ephemeral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Deploy Groups (ephemeral)
on:
push:
branches:
- "do/ephemeral-moons"
- 'do/ephemeral-moons'

#pull_request:

jobs:
build-frontend:
runs-on: ubuntu-latest
name: "Build Frontend"
name: 'Build Frontend'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,39 +26,37 @@ jobs:
- recursive: true
args: [--frozen-lockfile]
- name: Build packages
run: pnpm build:all

- working-directory: ./apps/tlon-web
run: pnpm build
run:
pnpm build

- uses: actions/upload-artifact@v4
with:
name: "ui-dist"
path: apps/tlon-web/dist
name: 'ui-dist'
path: apps/tlon-web/dist

glob:
runs-on: ubuntu-latest
name: "Make a glob"
name: 'Make a glob'
needs: build-frontend
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: "ui-dist"
name: 'ui-dist'
path: apps/tlon-web/dist
- id: "auth"
uses: "google-github-actions/auth@v1"
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: "${{ secrets.GCP_SERVICE_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
- name: "glob"
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'glob'
uses: ./.github/actions/glob
with:
folder: "apps/tlon-web/dist/*"
docket: "desk/desk.docket-0"
folder: 'apps/tlon-web/dist/*'
docket: 'desk/desk.docket-0'
- name: Commit and Push Glob
run: |
git config --global user.name github-actions
Expand All @@ -76,12 +74,12 @@ jobs:
needs: glob
steps:
- uses: actions/checkout@v4
- id: "auth"
uses: "google-github-actions/auth@v1"
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: "${{ secrets.GCP_SERVICE_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- id: create_moon
name: Create Moon
run: |
Expand All @@ -90,25 +88,24 @@ jobs:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}


deploy:
needs: create_moon
runs-on: ubuntu-latest
name: "Release to ~binnec-dozzod-marnus (canary)"
steps:
- uses: actions/checkout@v4
- id: "auth"
uses: "google-github-actions/auth@v1"
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: "${{ secrets.GCP_SERVICE_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/tlon-apps groups ${{
needs.build_test_images.outputs.moon_name }} us-central1-a
mainnet-tlon-other-2d
./.github/helpers/deploy.sh tloncorp/tlon-apps groups ${{ needs.build_test_images.outputs.moon_name }} us-central1-a mainnet-tlon-other-2d
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: Build packages
run: pnpm build:all
- working-directory: ./apps/tlon-web
run: pnpm build
- uses: actions/upload-artifact@v3
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/mobile-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
uses: pnpm/action-setup@v3
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build:all
- name: Create build vars
id: vars
run: |
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/mobile-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,13 @@ jobs:
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm build:all
- name: Create build vars
id: vars
run: |
echo "profile=${{ inputs.profile || 'preview' }}" >> $GITHUB_OUTPUT
- name: Push update for selected platforms
working-directory: ./apps/tlon-mobile
run:
eas update --auto --profile ${{ steps.vars.outputs.profile }}
--platform ${{ inputs.platform || 'all' }} --non-interactive
run: eas update --auto --profile ${{ steps.vars.outputs.profile }} --platform ${{ inputs.platform || 'all' }} --non-interactive
env:
NOTIFY_PROVIDER:
"${{ steps.vars.outputs.profile == 'preview' &&
'binnec-dozzod-marnus' || 'rivfur-livmet' }}"
NOTIFY_SERVICE:
"${{ steps.vars.outputs.profile == 'preview' &&
'tlon-preview-release' || 'groups-native' }}"
NOTIFY_PROVIDER: "${{ steps.vars.outputs.profile == 'preview' && 'binnec-dozzod-marnus' || 'rivfur-livmet' }}"
NOTIFY_SERVICE: "${{ steps.vars.outputs.profile == 'preview' && 'tlon-preview-release' || 'groups-native' }}"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
git add ./apps/tlon-web/src/\*.snap

pnpm exec lint-staged
2 changes: 2 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pnpm test
pnpm -r tsc
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"dev:ios": "concurrently \"pnpm run dev:shared\" \"pnpm --filter 'tlon-mobile' dev\" \"pnpm --filter 'tlon-mobile' ios\" \"pnpm --filter '@tloncorp/ui' watch\"",
"dev:web": "concurrently \"pnpm run dev:shared\" \"pnpm --filter 'tlon-web' dev-no-ssl\"",
"test": "pnpm run -r test run -u",
"prepare": "husky",
"postinstall": "pnpm run build:all",
"lint:all": "pnpm -r lint"
},
"dependencies": {
Expand All @@ -29,6 +31,7 @@
"eslint": "8.57.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^9.0.10",
"lint-staged": "^15.0.0",
"tsup": "^8.0.1",
"vitest": "^1.2.2"
Expand Down
12 changes: 11 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8c06ee1

Please sign in to comment.