-
Notifications
You must be signed in to change notification settings - Fork 10
50 lines (48 loc) · 1.59 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
49
50
on:
push:
branches: [main]
name: Release
jobs:
release:
if: github.repository == 'ydb-platform/ydb-embedded-ui'
runs-on: ubuntu-latest
env:
ASSET_NAME: embedded-ui
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: npm ci
- run: npm test
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
release-type: node
- run: npm publish
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- run: npm run build:embedded
if: ${{ steps.release.outputs.release_created }}
- name: Release Artifact Upload
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
run: |
zip -r $ASSET_NAME.zip build
gh release upload ${{ steps.release.outputs.tag_name }} $ASSET_NAME.zip
- name: Refresh Event Dispatch
if: ${{ steps.release.outputs.release_created }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
repository: ydb-platform/ydb
event-type: embedded_ui_refresh
client-payload: |
{
"tag_name": "${{ steps.release.outputs.tag_name }}",
"asset_name": "${{ env.ASSET_NAME }}",
"repository": "${{ github.repository }}"
}