Skip to content

Commit a380cd6

Browse files
committed
chore: merge next-release and release flows
1 parent 88fd067 commit a380cd6

File tree

2 files changed

+34
-52
lines changed

2 files changed

+34
-52
lines changed

.github/workflows/next-release.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,62 @@ on:
44
push:
55
branches:
66
- main
7+
- develop
8+
9+
permissions:
10+
id-token: write # for OIDC / npm provenance if you use it
11+
actions: write # if you dispatch other workflows
12+
contents: write # commits / tags / merge-back
713

814
jobs:
9-
publish-release:
15+
publish:
1016
runs-on: ubuntu-latest
1117
strategy:
1218
matrix:
1319
node-version: [24.x]
20+
1421
steps:
1522
- uses: actions/checkout@v2
1623
with:
17-
# pulls all commits (needed for semantic release to correctly version)
18-
fetch-depth: '0'
19-
# pulls all tags (needed for semantic release to correctly version)
20-
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
24+
fetch-depth: "0"
25+
26+
- name: Fetch tags
27+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
28+
2129
- name: Use Node.js ${{ matrix.node-version }}
2230
uses: actions/setup-node@v4
2331
with:
2432
node-version: ${{ matrix.node-version }}
25-
registry-url: 'https://registry.npmjs.org'
33+
registry-url: "https://registry.npmjs.org"
34+
2635
- name: Prepare git
2736
run: |
28-
git config --global user.name 'stream-ci-bot'
37+
git config --global user.name 'stream-ci-bot'
2938
git config --global user.email '[email protected]'
39+
3040
- name: Install && Build - SDK and Sample App
3141
uses: ./.github/actions/install-and-build-sdk
42+
3243
- name: Lint
3344
run: yarn lerna-workspaces run lint
34-
- name: Publish Release
35-
run: yarn release
45+
46+
- name: Test
47+
if: github.ref == 'refs/heads/develop'
48+
run: yarn test:coverage
49+
50+
- name: Publish Next Release (develop)
51+
if: github.ref == 'refs/heads/develop'
52+
run: |
53+
GITHUB_SHORT_SHA="$(git rev-parse --short $GITHUB_SHA)" yarn release-next
3654
env:
3755
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
38-
- name: Merge back changes
56+
57+
- name: Publish Release (main)
58+
if: github.ref == 'refs/heads/main'
59+
run: yarn release
60+
61+
- name: Merge back changes (main -> develop)
62+
if: github.ref == 'refs/heads/main'
3963
run: |
4064
git stash
4165
git checkout develop

0 commit comments

Comments
 (0)