|
2 | 2 | push:
|
3 | 3 | branches: [main]
|
4 | 4 |
|
5 |
| -name: release |
| 5 | +name: Release |
6 | 6 |
|
7 | 7 | jobs:
|
8 | 8 | release:
|
9 | 9 | if: github.repository == 'ydb-platform/ydb-embedded-ui'
|
10 | 10 | runs-on: ubuntu-latest
|
| 11 | + env: |
| 12 | + ASSET_NAME: embedded-ui |
11 | 13 | steps:
|
12 |
| - - uses: yandex-cloud/ui-release-action@main |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + - uses: actions/setup-node@v4 |
13 | 16 | with:
|
14 |
| - github-token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }} |
15 |
| - npm-token: ${{ secrets.NODE_AUTH_TOKEN }} |
| 17 | + node-version: 16 |
| 18 | + - run: npm ci |
| 19 | + - run: npm test |
| 20 | + - uses: GoogleCloudPlatform/release-please-action@v3 |
| 21 | + id: release |
| 22 | + with: |
| 23 | + token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }} |
| 24 | + release-type: node |
| 25 | + - run: npm publish |
| 26 | + if: ${{ steps.release.outputs.release_created }} |
| 27 | + env: |
| 28 | + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |
| 29 | + - run: npm run build:embedded |
| 30 | + if: ${{ steps.release.outputs.release_created }} |
| 31 | + - name: Release Artifact Upload |
| 32 | + if: ${{ steps.release.outputs.release_created }} |
| 33 | + env: |
| 34 | + GITHUB_TOKEN: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }} |
| 35 | + run: | |
| 36 | + zip -r $ASSET_NAME.zip build |
| 37 | + gh release upload ${{ steps.release.outputs.tag_name }} $ASSET_NAME.zip |
| 38 | + - name: Refresh Event Dispatch |
| 39 | + if: ${{ steps.release.outputs.release_created }} |
| 40 | + uses: peter-evans/repository-dispatch@v2 |
| 41 | + with: |
| 42 | + token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }} |
| 43 | + repository: ydb-platform/ydb |
| 44 | + event-type: embedded_ui_refresh |
| 45 | + client-payload: | |
| 46 | + { |
| 47 | + "tag_name": "${{ steps.release.outputs.tag_name }}", |
| 48 | + "asset_name": "${{ env.ASSET_NAME }}", |
| 49 | + "repository": "${{ github.repository }}" |
| 50 | + } |
0 commit comments