-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (71 loc) · 2.09 KB
/
publish-npm-and-actions.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: 📤publish-npm-and-actions
on:
workflow_dispatch: {}
workflow_run:
workflows: ['📤publish-dogu-agent-cloud-production']
types: [requested]
permissions:
id-token: write
contents: read
env:
DOGU_DEPLOY: true
DOGU_PYTHON_VERSION: 3.9.13
DOGU_POETRY_VERSION: 1.5.1
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: '${{ secrets.DOGU_GITHUB_TOKEN }}'
- name: Cache Yarn Unplugged
uses: actions/cache@v3
id: cache_yarn_unplugged
env:
cache-name: cache-yarn-unplugged
with:
path: ${{ github.workspace }}/.yarn/unplugged
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
- if: steps.cache_yarn_unplugged.outputs.cache-hit != 'true'
name: Run newbie
run: |
yarn newbie:cicd
- name: Build packages
run: |
yarn build:packages
- name: Build dogu-actions
run: |
yarn build:actions
- name: Use NPM Token with organization read access
uses: dkershner6/use-npm-token-action@v1
with:
token: '${{ secrets.DOGU_NPM_PUBLISH_TOKEN }}'
- name: Publish to npm
run: |
yarn publish:npm:prod
- uses: oleksiyrudenko/[email protected]
with:
global: true
name: Dogu Technologies
email: [email protected]
token: '${{ secrets.DOGU_ACTIONS_PUBLISH_TOKEN }}'
- name: Publish to github dogu-actions
run: |
yarn publish:github:prod
env:
DOGU_ACTIONS_PUBLISH_TOKEN: '${{ secrets.DOGU_ACTIONS_PUBLISH_TOKEN }}'
send-slack:
runs-on: ubuntu-latest
needs: publish
if: ${{ always() }}
steps:
- name: Send Slack
uses: dogu-team/[email protected]
with:
template: 'CD'
slack-channel-id: 'C057ML9UH34'
result-status: ${{ needs.publish.result }}
ignore-notify: false
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}