ci: migrate updates to GitHub Actions

This commit is contained in:
Maciej Barelkowski 2021-04-30 18:07:17 +02:00 committed by fake-join[bot]
parent 1f0fdefe40
commit 35c8ad53c8
6 changed files with 105 additions and 14 deletions

39
.github/workflows/INTEGRATION.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: INTEGRATION
on:
push:
tags:
- 'v[0-9]+.*'
jobs:
integration:
strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 14 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Set TAG
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Update integration test
env:
GH_AUTH: ${{ secrets.GH_AUTH }}
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
run: bash tasks/stages/update-integration-test

52
.github/workflows/POST_RELEASE.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: POST_RELEASE
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
post-release:
strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 14 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Set TAG
run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Update demo
env:
GH_AUTH: ${{ secrets.GH_AUTH }}
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
BPMN_IO_DEMO_ENDPOINT: ${{ secrets.BPMN_IO_DEMO_ENDPOINT }}
run: bash tasks/stages/update-demo
- name: Update examples
env:
GH_AUTH: ${{ secrets.GH_AUTH }}
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
run: bash tasks/stages/update-examples
- name: Update website
env:
GH_AUTH: ${{ secrets.GH_AUTH }}
BPMN_IO_EMAIL: ${{ secrets.BPMN_IO_EMAIL }}
BPMN_IO_USERNAME: ${{ secrets.BPMN_IO_USERNAME }}
run: bash tasks/stages/update-website

View File

@ -9,7 +9,7 @@ CLONE_DIR="$WORKDIR/bpmn-io-demo"
# create work dir
mkdir -p "$WORKDIR"
git clone --depth=1 "https://$GITHUB_AUTH@github.com/$BPMN_IO_DEMO_ENDPOINT.git" "$CLONE_DIR"
git clone --depth=1 "https://$GH_AUTH@github.com/$BPMN_IO_DEMO_ENDPOINT.git" "$CLONE_DIR"
cd "$CLONE_DIR"
@ -20,8 +20,8 @@ git config user.name "$BPMN_IO_USERNAME"
git config push.default simple
git add -A
git commit -m "deps: bump bpmn-js to $TRAVIS_TAG"
git tag "bpmn-js-$TRAVIS_TAG"
git commit -m "deps: bump bpmn-js to $TAG"
git tag "bpmn-js-$TAG"
git push -q &2>/dev/null
git push --tags -q &2>/dev/null

View File

@ -9,11 +9,11 @@ EXAMPLES_DIR="$WORKDIR/bpmn-js-examples"
# create work dir
mkdir -p "$WORKDIR"
git clone --depth=1 "https://$GITHUB_AUTH@github.com/bpmn-io/bpmn-js-examples.git" "$EXAMPLES_DIR"
git clone --depth=1 "https://$GH_AUTH@github.com/bpmn-io/bpmn-js-examples.git" "$EXAMPLES_DIR"
cd "$EXAMPLES_DIR"
TOOLKIT_VERSION="${TRAVIS_TAG:1}"
TOOLKIT_VERSION="${TAG:1}"
echo "Updating toolkit version to $TOOLKIT_VERSION"
sed -i -E "s#(\"bpmn-js\": )\"[^\"]+\"#\1\"^$TOOLKIT_VERSION\"#" **/package.json
@ -27,8 +27,8 @@ if [[ "x$SKIP_COMMIT" = "x" ]]; then
# add all resources
git add -A
git commit -m "chore: bump examples to $TRAVIS_TAG"
git tag "$TRAVIS_TAG"
git commit -m "chore: bump examples to $TAG"
git tag "$TAG"
git push -q &2>/dev/null
git push --tags -q &2>/dev/null
else

View File

@ -9,7 +9,7 @@ IT_DIR="$WORKDIR/bpmn-js-integration"
# create work dir
mkdir -p "$WORKDIR"
git clone --depth=1 "https://$GITHUB_AUTH@github.com/bpmn-io/bpmn-js-integration.git" "$IT_DIR"
git clone --depth=1 "https://$GH_AUTH@github.com/bpmn-io/bpmn-js-integration.git" "$IT_DIR"
cd "$IT_DIR"
@ -20,8 +20,8 @@ git config user.name "$BPMN_IO_USERNAME"
git config push.default simple
git add -A
git commit -m "deps: bump bpmn-js to $TRAVIS_TAG"
git tag "$TRAVIS_TAG"
git commit -m "deps: bump bpmn-js to $TAG"
git tag "$TAG"
git push -q &2>/dev/null
git push --tags -q &2>/dev/null

View File

@ -9,13 +9,13 @@ CLONE_DIR="$WORKDIR/bpmn.io"
# create work dir
mkdir -p "$WORKDIR"
git clone --depth=1 "https://$GITHUB_AUTH@github.com/bpmn-io/bpmn.io.git" "$CLONE_DIR"
git clone --depth=1 "https://$GH_AUTH@github.com/bpmn-io/bpmn.io.git" "$CLONE_DIR"
cd "$CLONE_DIR"
echo "Updating toolkit version to $TRAVIS_TAG on bpmn.io"
echo "Updating toolkit version to $TAG on bpmn.io"
cat src/data/site.yml | tr "\r?\n" "\r" | sed -e "s#bpmnjs:\r version: [^\r]*\r#bpmnjs:\r version: $TRAVIS_TAG\r#" | tr "\r" "\n" > src/data/site.yml_new
cat src/data/site.yml | tr "\r?\n" "\r" | sed -e "s#bpmnjs:\r version: [^\r]*\r#bpmnjs:\r version: $TAG\r#" | tr "\r" "\n" > src/data/site.yml_new
mv -f src/data/site.yml_new src/data/site.yml
if [[ "x$SKIP_COMMIT" = "x" ]]; then
@ -26,7 +26,7 @@ if [[ "x$SKIP_COMMIT" = "x" ]]; then
# add all resources
git add -A
git commit -m "chore: bump bpmn-js to $TRAVIS_TAG"
git commit -m "chore: bump bpmn-js to $TAG"
git push -q &2>/dev/null
else
echo "Skipping commit (SKIP_COMMIT=$SKIP_COMMIT)"