Skip to content

Commit

Permalink
Demo code initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon committed Jul 28, 2021
1 parent 20a8e64 commit c1822e0
Show file tree
Hide file tree
Showing 9 changed files with 2,451 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/commands-handler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Commands processor

on:
issue_comment:
types: [created]

jobs:
process:
name: Process command
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '@client-engineering-bot ') }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout release actions
uses: actions/checkout@v2
with:
repository: pubnub/client-engineering-deployment-tools
ref: github-actions
token: ${{ secrets.GH_TOKEN }}
path: ".github/.release/actions"
- name: Run changelogs actions
uses: "./.github/.release/actions/actions/commands"
with:
token: ${{ secrets.GH_TOKEN }}
listener: pingyua
publisher-name: Serhii Mamontov
publisher-email: parfeon@me.com
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Automated project release

on:
pull_request:
branches: [ master ]
types: [ closed ]

jobs:
check-release:
name: Check release required
runs-on: ubuntu-latest
# Uncomment this to run job only for merge (not PR close).
# if: ${{ github.event.pull_request.merged }}
outputs:
release: ${{ steps.check.outputs.ready }}
steps:
- name: Checkout actions
uses: actions/checkout@v2
with:
repository: pubnub/client-engineering-deployment-tools
ref: github-actions
token: ${{ secrets.GH_TOKEN }}
path: ".github/.release/actions"
- id: check
name: Check pre-release completed
uses: "./.github/.release/actions/actions/checks/release"
with:
token: ${{ secrets.GH_TOKEN }}
publish:
name: Publish package
runs-on: ubuntu-latest
needs: check-release
if: ${{ needs.check-release.outputs.release == 'true' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# This should be the same as the one specified for on.pull_request.branches
ref: master
- name: Checkout actions
uses: actions/checkout@v2
with:
repository: pubnub/client-engineering-deployment-tools
ref: github-actions
token: ${{ secrets.GH_TOKEN }}
path: ".github/.release/actions"
- name: Run release actions
# Intentional fail, because credentials not specified.
uses: "./.github/.release/actions/actions/services/npm"
1 change: 1 addition & 0 deletions .github/workflows/release/pre-publish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('>>>> Hello from JS')
5 changes: 5 additions & 0 deletions .github/workflows/release/pre-publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e

echo "Hello from bash $(date)!"
echo "Hello from bash $(date)!" > "./generated.txt"
6 changes: 6 additions & 0 deletions .github/workflows/release/products.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"project-1": {
"path": "project1",
"name": "Monorepo demo"
}
}
26 changes: 26 additions & 0 deletions .github/workflows/release/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"README.md": [
{
"pattern": "sdk\/javascript\/pubnub\\.((\\d+\\.?){2,})(.min)?\\.js$",
"cleared": true
}
],
"src/core/components/config.js": [
{
"pattern": "^\\s{2,}return '((\\d+\\.?){2,})';$",
"cleared": false
}
],
".pubnub.yml": [
{
"pattern": "^version: \"(.+)\"$",
"cleared": false
}
],
"package.json": [
{
"pattern": "^\\s{2,}\"version\": \"(.+)\",$",
"cleared": true
}
]
}

0 comments on commit c1822e0

Please sign in to comment.