mirror of
https://github.com/standardnotes/web.git
synced 2024-10-27 16:31:40 +03:00
chore: workflows for removal of develop branch
This commit is contained in:
parent
c859876bb5
commit
bd66b191a5
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@ -13,10 +13,10 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop, main ]
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ develop ]
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '21 7 * * 0'
|
||||
|
||||
|
16
.github/workflows/desktop.release.beta.yml
vendored
16
.github/workflows/desktop.release.beta.yml
vendored
@ -1,16 +0,0 @@
|
||||
name: Desktop Beta Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/*desktop*beta*'
|
||||
- '*standardnotes/*desktop*alpha*'
|
||||
- '!*standardnotes/*inner-desktop*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
uses: standardnotes/app/.github/workflows/desktop.release.reuse.yml@develop
|
||||
secrets: inherit
|
||||
with:
|
||||
channel: beta
|
4
.github/workflows/desktop.release.prod.yml
vendored
4
.github/workflows/desktop.release.prod.yml
vendored
@ -1,11 +1,9 @@
|
||||
name: Desktop Prod Release
|
||||
name: Desktop Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/*desktop*'
|
||||
- '!*standardnotes/*desktop*beta*'
|
||||
- '!*standardnotes/*desktop*alpha*'
|
||||
- '!*standardnotes/*inner-desktop*'
|
||||
workflow_dispatch:
|
||||
|
||||
|
4
.github/workflows/mobile.release.prod.yml
vendored
4
.github/workflows/mobile.release.prod.yml
vendored
@ -1,11 +1,9 @@
|
||||
name: Mobile Build Production
|
||||
name: Mobile Release Production
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/mobile*'
|
||||
- '!*standardnotes/mobile*beta*'
|
||||
- '!*standardnotes/mobile*alpha*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
@ -1,10 +1,6 @@
|
||||
name: Mobile Build Development
|
||||
name: Mobile TestFlight
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/*mobile*beta*'
|
||||
- '*standardnotes/*mobile*alpha*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
73
.github/workflows/mobile.test.yml
vendored
73
.github/workflows/mobile.test.yml
vendored
@ -1,73 +0,0 @@
|
||||
name: Mobile e2e
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
android:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Download Android Emulator Image
|
||||
run: |
|
||||
$ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-28;default;x86_64"
|
||||
$ANDROID_HOME/tools/bin/avdmanager create avd -n pixel -d "Nexus 5X" --package "system-images;android-28;default;x86_64"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Add usesCleartextTraffic to release AndroidManifest.xml
|
||||
run: yarn replace-in-file '<application' '<application android:usesCleartextTraffic="true"' ./android/app/src/main/AndroidManifest.xml
|
||||
|
||||
- name: Build for detox
|
||||
env:
|
||||
DETOX_CI: true
|
||||
run: yarn detox build --configuration android.emu.release
|
||||
|
||||
- name: Setup Emulator
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
echo "Starting emulator"
|
||||
nohup $ANDROID_HOME/emulator/emulator -avd pixel -no-audio -no-snapshot -no-window -gpu swiftshader_indirect &
|
||||
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
|
||||
$ANDROID_HOME/platform-tools/adb shell settings put global window_animation_scale 0 &
|
||||
$ANDROID_HOME/platform-tools/adb shell settings put global transition_animation_scale 0 &
|
||||
$ANDROID_HOME/platform-tools/adb shell settings put global animator_duration_scale 0 &
|
||||
echo "Emulator started"
|
||||
- name: Run tests
|
||||
run: yarn detox test --configuration android.emu.release
|
||||
|
||||
ios:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./packages/mobile
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Install Pods
|
||||
run: npx pod-install ios
|
||||
|
||||
- name: Install detox dependencies
|
||||
run: brew tap wix/brew
|
||||
- name: Install simulator utils
|
||||
run: brew install applesimutils
|
||||
- name: Build for detox
|
||||
run: yarn detox build --configuration ios.sim.release
|
||||
- name: Run tests
|
||||
run: yarn detox test --configuration ios.sim.release
|
1
.github/workflows/pr.components.yml
vendored
1
.github/workflows/pr.components.yml
vendored
@ -3,7 +3,6 @@ name: Components PR
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
- main
|
||||
paths:
|
||||
- packages/components/**
|
||||
|
1
.github/workflows/pr.yml
vendored
1
.github/workflows/pr.yml
vendored
@ -3,7 +3,6 @@ name: General PR
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
- main
|
||||
paths:
|
||||
- '**/**'
|
||||
|
37
.github/workflows/promote.develop.yml
vendored
37
.github/workflows/promote.develop.yml
vendored
@ -1,37 +0,0 @@
|
||||
name: Promote Develop To Main
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
Run:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: develop
|
||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup git config
|
||||
run: |
|
||||
git config --global user.name "standardci"
|
||||
git config --global user.email "ci@standardnotes.com"
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v4
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.PASSPHRASE }}
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
|
||||
- name: Merge Develop into Main
|
||||
run: |
|
||||
git config pull.rebase false
|
||||
git checkout main
|
||||
git pull origin develop
|
||||
git push origin main
|
||||
|
||||
|
77
.github/workflows/publish.dev.yml
vendored
77
.github/workflows/publish.dev.yml
vendored
@ -1,77 +0,0 @@
|
||||
name: Version Bump Dev
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop ]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
if: contains(github.event.head_commit.message, 'chore(release)') == false
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Setup git config
|
||||
run: |
|
||||
git config --global user.name "standardci"
|
||||
git config --global user.email "ci@standardnotes.com"
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v4
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.PASSPHRASE }}
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Bump Prod Version Graduate
|
||||
continue-on-error: true
|
||||
id: graduateRelease
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
yarn release:prod:graduate
|
||||
yarn publish:prod
|
||||
|
||||
- name: Bump Prod Version Fallback
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && steps.graduateRelease.outcome == 'failure' }}
|
||||
run: |
|
||||
echo Falling back to non-graduate release due to https://github.com/lerna/lerna/issues/2532
|
||||
git stash
|
||||
yarn release:prod
|
||||
yarn publish:prod
|
||||
|
||||
- name: Bump Beta Version
|
||||
if: ${{ github.ref == 'refs/heads/develop' }}
|
||||
run: |
|
||||
yarn release:beta
|
||||
yarn publish:beta
|
||||
|
||||
- name: Merge release into develop
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
git config pull.rebase false
|
||||
git checkout develop
|
||||
git pull origin main
|
||||
git push origin develop
|
||||
|
||||
- name: Notify Release Update
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
repository: ${{ secrets.RELEASES_EVENT_RECEIVING_REPO }}
|
||||
event-type: releases-updated-event
|
@ -6,7 +6,7 @@ on:
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
if: "${{ contains(github.event.head_commit.message, 'chore(release): publish main') == false }}"
|
||||
if: "${{ contains(github.event.head_commit.message, 'chore(release): publish') == false }}"
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
@ -38,38 +38,12 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Bump Prod Version Graduate
|
||||
continue-on-error: true
|
||||
id: graduateRelease
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Bump Prod Version
|
||||
run: |
|
||||
yarn release:prod:graduate
|
||||
yarn publish:prod
|
||||
|
||||
- name: Bump Prod Version Fallback
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && steps.graduateRelease.outcome == 'failure' }}
|
||||
run: |
|
||||
echo Falling back to non-graduate release due to https://github.com/lerna/lerna/issues/2532
|
||||
git stash
|
||||
yarn release:prod
|
||||
yarn publish:prod
|
||||
|
||||
- name: Bump Beta Version
|
||||
if: ${{ github.ref == 'refs/heads/develop' }}
|
||||
run: |
|
||||
yarn release:beta
|
||||
yarn publish:beta
|
||||
|
||||
- name: Merge release into develop
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
git config pull.rebase false
|
||||
git checkout develop
|
||||
git pull origin main
|
||||
git push origin develop
|
||||
|
||||
- name: Notify Release Update
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
78
.github/workflows/web.release.beta.yml
vendored
78
.github/workflows/web.release.beta.yml
vendored
@ -1,78 +0,0 @@
|
||||
name: Web Server Beta
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ beta/* ]
|
||||
paths:
|
||||
- packages/web-server/**
|
||||
- packages/web/**
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Install dependencies
|
||||
run: yarn install
|
||||
- name: ESLint
|
||||
run: yarn lint
|
||||
- name: Build
|
||||
run: yarn build:web-server
|
||||
- name: Test
|
||||
run: yarn test
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Copy robots.txt
|
||||
run: cp public/robots.txt.development public/robots.txt
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: standardnotes/web
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
tags: "beta,${{ github.sha }}"
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition app-beta-dev --query taskDefinition > task-definition.json
|
||||
|
||||
- name: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: app-beta-dev
|
||||
image: "standardnotes/web:${{ github.sha }}"
|
||||
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def.outputs.task-definition }}
|
||||
service: app-beta-dev
|
||||
cluster: dev
|
||||
wait-for-service-stability: true
|
||||
|
||||
notify_discord:
|
||||
needs: deploy
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Run Discord Webhook
|
||||
uses: johnnyhuy/actions-discord-git-webhook@main
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
2
.github/workflows/web.release.prod.yml
vendored
2
.github/workflows/web.release.prod.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Web Server Prod
|
||||
name: Web Server Deploy
|
||||
|
||||
concurrency:
|
||||
group: prod_environment
|
||||
|
@ -1,14 +1,10 @@
|
||||
name: Web Server Dev
|
||||
name: Web Server TestFlight
|
||||
|
||||
concurrency:
|
||||
group: dev_environment
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/*web-server*beta*'
|
||||
- '*standardnotes/*web-server*alpha*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
@ -26,11 +26,8 @@
|
||||
"start:server:web:localhost": "lerna run start:no-binding --scope=@standardnotes/web-server",
|
||||
"prepare": "husky install",
|
||||
"reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install",
|
||||
"release:prod": "lerna version --conventional-commits --yes -m \"chore(release): publish main\"",
|
||||
"release:prod:graduate": "lerna version --conventional-graduate --conventional-commits --yes -m \"chore(release): publish main\"",
|
||||
"release:beta": "lerna version --conventional-prerelease --conventional-commits --yes -m \"chore(release): publish\"",
|
||||
"release:prod": "lerna version --conventional-commits --yes -m \"chore(release): publish\"",
|
||||
"publish:prod": "lerna publish from-git --yes",
|
||||
"publish:beta": "lerna publish from-git --yes --dist-tag alpha",
|
||||
"version": "yarn install --no-immutable && git add yarn.lock",
|
||||
"postversion": "./scripts/push-tags-one-by-one.sh",
|
||||
"lerna:list": " yarn lerna list -all",
|
||||
|
Loading…
Reference in New Issue
Block a user