-
Notifications
You must be signed in to change notification settings - Fork 52
48 lines (41 loc) · 1.21 KB
/
release.yml
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
name: Publish Push SDK
on:
pull_request:
types: [closed]
branches:
- main
jobs:
publish:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Setup NodeJS"
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Ensure NPM access
run: |
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup Git
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
- run: yarn install --frozen-lockfile
# The NX target "ci-version" has postTargets=[build, ci-publish]
- name: "Version, Build, Publish"
shell: bash
run: yarn nx affected --target ci-version --base= origin/main~1 --head= HEAD --parallel=1 --exclude=demoreact demonative
- name: "Push GIT Tags"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
git push origin main --follow-tags