Skip to content

Commit

Permalink
feat: update release flow to exclude next branch (refinedev#5208)
Browse files Browse the repository at this point in the history
* feat: update announcements branch for cli and devtools

* feat: update README for all examples

* feat: update next references to master on docs

* feat: remove git branches section from contributing.md

* feat: update blob/next references to blob/master

* feat: update commit frequency references to master

* feat: update branch for build all examples workflow

* chore: add changesets

* feat: remove next-push workflow and move live preview deployment to master

* chore: update .editorconfig

* chore: use checkout@v3 for master-push and remove redundant steps

* chore: update store-deploy workflow branch to master

* chore: revert formatting changes on documentation

* chore: update branch references for v3 docs
  • Loading branch information
BatuhanW authored Nov 1, 2023
1 parent 15b3524 commit 72f9f60
Show file tree
Hide file tree
Showing 320 changed files with 1,121 additions and 1,292 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-cats-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/devtools-server": patch
---

chore: update feed URL from next to master branch.
6 changes: 6 additions & 0 deletions .changeset/smooth-geckos-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@refinedev/ui-tests": patch
"@refinedev/ui-types": patch
---

chore: update commit frequency branch from next to master on README.
5 changes: 5 additions & 0 deletions .changeset/spotty-papayas-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/core": patch
---

chore: update commit frequency branch from next to master in README.
5 changes: 5 additions & 0 deletions .changeset/thin-colts-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/cli": patch
---

chore: update announcements source from next to master branch.
5 changes: 5 additions & 0 deletions .changeset/wicked-queens-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/devtools-ui": patch
---

chore: update T&C link from next to master branch.
35 changes: 20 additions & 15 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"node": "16",
"buildCommand": "bootstrap",
"packages": [
"packages/antd",
"packages/mui",
"packages/core",
"packages/nextjs-router",
"packages/react-hook-form",
"packages/react-location",
"packages/react-router-v6",
"packages/react-table",
"packages/simple-rest"
],
"sandboxes": ["/examples/finefoods-antd", "/examples/finefoods-client", "/examples/finefoods-material-ui", "/examples/base-antd"]
}
"node": "16",
"buildCommand": "bootstrap",
"packages": [
"packages/antd",
"packages/mui",
"packages/core",
"packages/nextjs-router",
"packages/react-hook-form",
"packages/react-location",
"packages/react-router-v6",
"packages/react-table",
"packages/simple-rest"
],
"sandboxes": [
"/examples/finefoods-antd",
"/examples/finefoods-client",
"/examples/finefoods-material-ui",
"/examples/base-antd"
]
}
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2
4 changes: 2 additions & 2 deletions .github/workflows/examples-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build All Examples
on:
pull_request:
branches:
- next
- master
types:
- synchronize
- opened
Expand All @@ -13,7 +13,7 @@ on:
- "examples/**"
push:
branches:
- next
- master
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
Expand Down
81 changes: 54 additions & 27 deletions .github/workflows/master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: rokroskar/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand All @@ -44,10 +44,6 @@ jobs:
# run: npm run lint
- name: Test
run: npm run test:all
- name: Prepare Stable version changesets
if: "!contains(github.event.head_commit.message, 'ci(changesets): version packages')"
run: |
cp -R ./_changeset/* ./.changeset || : && rm -rf ./_changeset/
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand All @@ -60,31 +56,62 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PANKOD_BOT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: update master branch
if: ${{ steps.changesets.outputs.published == 'true' }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "pankod-bot"
git checkout master
git pull origin master
rm -rf ./_changeset/
git commit -am "chore: remove deployed changesets ci skip"
git push origin master
documentation-live-preview:
needs: publish
if: ${{ needs.publish.outputs.published == 'true' }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-next-documentation-live-preview
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
steps:
- name: Workflow run cleanup action
uses: rokroskar/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.PANKOD_BOT_TOKEN }}
- name: update next branch
if: ${{ steps.changesets.outputs.published == 'true' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: live previews docker build
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
repository: refinedev/refine/refine-live-preview
dockerfile: packages/live-previews/Dockerfile
tag_with_sha: true
- name: Set up kubectl
uses: matootie/[email protected]
with:
personalAccessToken: ${{ secrets.DIGITALOCEAN_TOKEN }}
clusterName: pankod-k8s
expirationTime: 1200
- name: Get nodes
run: kubectl get nodes
- name: Deploy refine-live-previews-documentation to k8s
run: |
git config --global user.email "[email protected]"
git config --global user.name "pankod-bot"
git fetch origin
git checkout next
git pull origin next
rm -rf ./_changeset/
git commit -am "chore: remove deployed changesets ci skip"
git push origin next
cd packages/live-previews
mv ./k8s/live-previews/Chart.yaml ./k8s/live-previews/Chart.old.yaml &&
cat ./k8s/live-previews/Chart.old.yaml | grep -v appVersion > ./k8s/live-previews/Chart.yaml &&
echo -e "\r\nappVersion: sha-${GITHUB_SHA::7}\r\n" >> ./k8s/live-previews/Chart.yaml &&
cat ./k8s/live-previews/Chart.yaml
helm upgrade refine-next-live-previews-documentation ./k8s/live-previews --install --atomic --timeout 20m0s --values=./k8s/live-previews/values.yaml \
--set replicaCount=3 \
--set ingress.enabled=true \
--set ingress.annotations."kubernetes\.io/ingress\.class"=nginx \
--set ingress.annotations."cert-manager\.io/issuer"=letsencrypt-prod \
--set ingress.hosts[0].host=${{ env.domain }} \
--set ingress.hosts[0].paths[0].path="/" \
--set ingress.hosts[0].paths[0].pathType=ImplementationSpecific \
--set ingress.tls[0].secretName=${{ env.domain }} \
--set ingress.tls[0].hosts[0]=${{ env.domain }} \
env:
GITHUB_TOKEN: ${{ secrets.PANKOD_BOT_TOKEN }}
domain: "next.live-previews.refine.dev"
documentation-gh:
runs-on: ubuntu-latest
concurrency:
Expand Down
177 changes: 0 additions & 177 deletions .github/workflows/next-push.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/store-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: store Release
on:
push:
branches:
- next
- master
paths:
- "examples/store/**"
- ".github/workflows/store-deploy.yml"
Expand Down
Loading

0 comments on commit 72f9f60

Please sign in to comment.