Skip to content

Commit

Permalink
Setup automated dev-builds (#177)
Browse files Browse the repository at this point in the history
* Setup automated dev-builds

* update workflows triggers for dev-builds
  • Loading branch information
marcoroth authored Jan 14, 2022
1 parent 9e9bf3e commit d13e342
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: dev-builds
on:
push:
branches:
- master

pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
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}

0 comments on commit d13e342

Please sign in to comment.