-
Notifications
You must be signed in to change notification settings - Fork 88
79 lines (66 loc) · 2.23 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
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
name: Release
on:
push:
# tags:
# - '!player/'
# - 'v*'
jobs:
test_and_build:
uses: ./.github/workflows/ci.yml
download_and_publish:
needs: test_and_build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: develop
- name: Install dependencies
run: npm ci
- name: Extract version from tag
uses: actions/github-script@v6
id: extract-version
with:
script: |
const defineVersion = require('./.github/scripts/defineVersion.js')
return defineVersion.getPlayerUiVersion("v3.67.0")
- uses: actions/download-artifact@v3
with:
path: .
- name: Unpackage artifact files
run: tar -xzvf artifact/artifact.tar.gz -C .
shell: bash
# - name: Publish
# run: ./publish.sh
# shell: bash
# env:
# NPM_DRY_RUN: false
# NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Upload API Docs
uses: ./.github/actions/publish-docs
with:
docs_path: './docs/'
destination_path: "player/ui/${{ fromJson(steps.extract-version.outputs.result).full }}/"
bucket: ${{ secrets.GCS_BUCKET }}
credentials_json: ${{ secrets.GCS_CREDENTIALS }}
- name: Upload API Docs for major version
uses: ./.github/actions/publish-docs
with:
docs_path: './docs/'
destination_path: 'player/ui/3/'
bucket: ${{ secrets.GCS_BUCKET }}
credentials_json: ${{ secrets.GCS_CREDENTIALS }}
# - name: Notify team
# run: node .github/scripts/notifySlackTeam.js 'success' 'CHANGELOG.md' ${{ secrets.RELEASE_SUCCESS_SLACK_WEBHOOK }}
# handle_failure:
# runs-on: ubuntu-latest
# needs: [test_and_build, download_and_publish]
# if: ${{ always() && (needs.download_and_publish.result == 'failure' || needs.test_and_build.result == 'failure') }}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# ref: develop
#
# - name: Notify team
# run: node .github/scripts/notifySlackTeam.js 'failure' 'CHANGELOG.md' ${{ secrets.RELEASE_FAILURE_SLACK_WEBHOOK }} ${{ github.run_id }}