-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 2.37 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches-ignore:
- "release-please*"
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created_sdk: ${{ steps.release.outputs['packages/sdk--release_created'] }}
release_created_sdk_react_provider: ${{ steps.release.outputs['packages/sdk-react-provider--release_created'] }}
release_created: ${{ steps.release.outputs.release_created }}
releases_created: ${{ steps.release.outputs.releases_created }}
pr_created: ${{ steps.release.outputs.prs_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
sha: ${{ steps.release.outputs.sha }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
# target-branch: chore/my-please-release-testbranch
- name: echo values
run: |
echo "Release created SDK: ${{ steps.release.outputs['packages/sdk--release_created'] }}"
echo "Release created React Provider: ${{ steps.release.outputs['packages/sdk-react-provider--release_created'] }}"
echo "Releases created: ${{ steps.release.outputs.releases_created }}"
echo "PR created: ${{ steps.release.outputs.prs_created }}"
echo "Release tag_name: ${{ steps.release.outputs.tag_name }}"
echo "Release sha: ${{ steps.release.outputs.sha }}"
build:
needs: [release-please]
name: Build, Test, Lint and Publish
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Cache PNPM install and Turbo
uses: ./.github/actions/cache-setup
- name: Build
run: pnpm build
- name: Test
run: pnpm test
- name: Lint
run: pnpm lint
- name: Publish SDK
#run: pnpm --filter @monerium/sdk pub:pre
run: pnpm --filter @monerium/sdk publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ needs.release-please.outputs.release_created_sdk }}
- name: Publish React Provider
# run: pnpm --filter @monerium/sdk-react-provider pub:pre
run: pnpm --filter @monerium/sdk-react-provider publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ needs.release-please.outputs.release_created_sdk_react_provider }}