-
-
Notifications
You must be signed in to change notification settings - Fork 70
48 lines (37 loc) · 1.46 KB
/
dev-build.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
name: dev-builds
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Build JavaScript package
run: |
yarn install
yarn build
# yarn test
yarn pack --filename cable_ready-dev-build.tgz
- name: Publish Dev Build
run: |
name="$(git log -n 1 --format=format:%cn)"
email="$(git log -n 1 --format=format:%ce)"
message="$(git log -n 1 --format=format:%s)"
date="$(git log -n 1 --format=format:%ai)"
tar -xf cable_ready-dev-build.tgz
git clone https://github.com/cableready/dev-builds && cd dev-builds
git remote remove origin
git remote add origin https://${{ secrets.CABLEREADY_BOT_DEV_BUILDS_TOKEN }}@github.com/cableready/dev-builds.git
git checkout --orphan "${GITHUB_SHA:0:7}"
cp -r ../package/. ./
git add .
# git add dist/ javascript/ README.md CHANGELOG.md LICENSE.txt package.json
git config --global user.name "$name"
git config --global user.email "$email"
GIT_COMMITER_DATE=${date} git commit -m "cable_ready/${GITHUB_SHA:0:7} ${message}" --date "${date}"
git tag cable_ready/${GITHUB_SHA:0:7} -m "cable_ready/${GITHUB_SHA:0:7} ${message}"
git push origin cable_ready/${GITHUB_SHA:0:7}