Skip to content

Commit 89775aa

Browse files
authored
Merge pull request #1175 from GetStream/vishal/enable-release-automation
2 parents 4c53f33 + 7a5dc20 commit 89775aa

File tree

2 files changed

+47
-47
lines changed

2 files changed

+47
-47
lines changed

.github/workflows/docusaurus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- name: push
1616
uses: GetStream/push-stream-chat-docusaurus-action@main
1717
with:
18-
target-branch: 'production'
18+
target-branch: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }}
1919
env:
2020
DOCUSAURUS_GH_TOKEN: ${{ secrets.DOCUSAURUS_GH_TOKEN }}

.github/workflows/release.yml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
#name: Release
2-
#
3-
##on:
4-
## push:
5-
## branches:
6-
## - master
7-
#
8-
#jobs:
9-
# publish-release:
10-
# runs-on: ubuntu-latest
11-
# strategy:
12-
# matrix:
13-
# node-version: [12.x]
14-
# steps:
15-
# - uses: actions/checkout@v2
16-
# with:
17-
# token: ${{ secrets.VERSION_BUMP_TOKEN }}
18-
# # pulls all commits (needed for semantic release to correctly version)
19-
# fetch-depth: '0'
20-
# # pulls all tags (needed for semantic release to correctly version)
21-
# - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
22-
# - name: Use Node.js ${{ matrix.node-version }}
23-
# uses: actions/setup-node@v2
24-
# with:
25-
# node-version: ${{ matrix.node-version }}
26-
# registry-url: 'https://registry.npmjs.org'
27-
# - name: Prepare git
28-
# run: |
29-
# git config --global user.name "Vishal Narkhede"
30-
# git config --global user.email "[email protected]"
31-
# - name: Installation && Build SDK
32-
# run: yarn --frozen-lockfile && yarn bootstrap-ci
33-
# - name: Lint
34-
# run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx'
35-
# - name: Publish Release
36-
# run: yarn release
37-
# env:
38-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
39-
# GH_TOKEN: ${{ secrets.VERSION_BUMP_TOKEN }}
40-
# - name: Merge back changes
41-
# run: |
42-
# git stash
43-
# git checkout develop
44-
# git pull origin develop
45-
# git merge master -m "chore: merge back release [skip ci]"
46-
# git push origin develop
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish-release:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [12.x]
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
token: ${{ secrets.VERSION_BUMP_TOKEN }}
18+
# pulls all commits (needed for semantic release to correctly version)
19+
fetch-depth: '0'
20+
# pulls all tags (needed for semantic release to correctly version)
21+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
registry-url: 'https://registry.npmjs.org'
27+
- name: Prepare git
28+
run: |
29+
git config --global user.name "Vishal Narkhede"
30+
git config --global user.email "[email protected]"
31+
- name: Installation && Build SDK
32+
run: yarn --frozen-lockfile && yarn bootstrap-ci
33+
- name: Lint
34+
run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx'
35+
- name: Publish Release
36+
run: yarn release
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
39+
GH_TOKEN: ${{ secrets.VERSION_BUMP_TOKEN }}
40+
- name: Merge back changes
41+
run: |
42+
git stash
43+
git checkout develop
44+
git pull origin develop
45+
git merge master -m "chore: merge back release [skip ci]"
46+
git push origin develop

0 commit comments

Comments
 (0)