-
Notifications
You must be signed in to change notification settings - Fork 360
66 lines (53 loc) · 1.71 KB
/
release.yml
File metadata and controls
66 lines (53 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Release
on:
push:
branches:
- main
# - develop
permissions:
id-token: write # for OIDC / npm provenance if you use it
actions: write # if you dispatch other workflows
contents: write # commits / tags / merge-back
jobs:
publish:
runs-on: public
strategy:
matrix:
node-version: [24.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Prepare git
run: |
git config --global user.name 'stream-ci-bot'
git config --global user.email 'stream-bot@getstream.io'
- name: Install && Build - SDK and Sample App
uses: ./.github/actions/install-and-build-sdk
- name: Lint
run: yarn lerna-workspaces run lint
- name: Test
if: github.ref == 'refs/heads/develop'
run: yarn test:coverage
- name: Publish Next Release (develop)
if: github.ref == 'refs/heads/develop'
run: |
GITHUB_SHORT_SHA="$(git rev-parse --short $GITHUB_SHA)" yarn release-next
- name: Publish Release (main)
if: github.ref == 'refs/heads/main'
run: yarn release
- name: Merge back changes (main -> develop)
if: github.ref == 'refs/heads/main'
run: |
git stash
git checkout develop
git pull origin develop
git merge main -m "chore: merge back release [skip ci]"
git push origin develop