-
Notifications
You must be signed in to change notification settings - Fork 2
106 lines (104 loc) · 3.76 KB
/
publish-release-npm.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# name: Publish Release
# on:
# release:
# types: [released]
# jobs:
# build:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [18]
# steps:
# - uses: actions/checkout@v4
# with:
# token: ${{ secrets.PACKAGE_SECRET }}
# - name: Check cache
# id: cache
# uses: actions/cache@v1
# with:
# path: packages/sdk/node_modules
# key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}-0
# restore-keys: |
# ${{ runner.os }}-node-
# - name: Use Node ${{ matrix.node-version }}
# uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.node-version }}
# registry-url: "https://registry.npmjs.org"
# - name: install dependencies
# run: yarn install
# - name: run linting
# run: yarn ci-lint
# - name: run tests
# run: yarn cover
# - name: run readmeUpdater
# run: yarn make-badges
# - name: build code
# run: yarn build
# - name: bump version
# uses: phips28/gh-action-bump-version@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_SECRET }}
# with:
# version-type: 'patch'
# skip-commit: "true"
# skip-tag: "true"
# - name: execute local js script
# run: node ./.github/scripts/replicate-version.js
# - name: publish sdk build
# run: |
# # Get the full reference of the release
# ref=${{ github.ref }}
# # Remove the refs/tags/ prefix
# tag=${ref#refs/tags/}
# stripped_tag=${tag%-*}
# node cicd.js sdk,connectors yarn publish --tag $stripped_tag --tag latest
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
# - name: execute commit script
# run: node ./.github/scripts/commit.js
# - name: get new npm version
# id: package-version
# uses: martinbeentjes/npm-get-version-action@master
# - name: copy file branch
# run: |
# path=packages/sdk/upload/latest
# versionpath=packages/sdk/upload/${{ github.event.release.name }}
# mkdir -p ${path%"/merge"}
# cp -R packages/sdk/_bundles/* ${path%"/merge"}
# mkdir -p ${versionpath%"/merge"}
# cp -R packages/sdk/_bundles/* ${versionpath%"/merge"}
# - name: Copy to Azure Blob Storage
# uses: azure/CLI@v1
# with:
# inlineScript: |
# az storage blob upload-batch -d sdk -s packages/sdk/upload/ --connection-string "${{ secrets.AZURE_CDN_STUDIO_PRD_CONNECTION_STRING }}" --overwrite true
# - name: prepare for actions upload
# run: |
# node cicd.js actions node scripts/prepare-release.mjs
# - name: Copy to Azure Blob Storage (Actions)
# uses: azure/CLI@v1
# with:
# inlineScript: |
# az storage blob upload-batch -d sdk -s packages/actions/cdn/ --connection-string "${{ secrets.AZURE_CDN_STUDIO_PRD_CONNECTION_STRING }}" --overwrite true
# bump:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [18]
# needs: build
# steps:
# - name: bump version
# uses: phips28/gh-action-bump-version@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_SECRET }}
# with:
# version-type: 'preminor'
# skip-commit: "true"
# skip-tag: "true"
# - name: execute local js script
# run: node ./.github/scripts/replicate-version.js
# - name: execute commit script
# run: node ./.github/scripts/commit.js