-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (85 loc) · 2.85 KB
/
push_master.workflow.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
name: Deployment Doc Dev
on:
push:
branches:
- master
jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "11"
architecture: x64
- uses: ./.github/actions/lint
unit-tests:
name: Unit Tests
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "11"
architecture: x64
- uses: ./.github/actions/unit-tests
documentation-snippets-tests:
name: Documentation - Snippets Tests
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/[email protected]
with:
node-version: "12"
- uses: ./.github/actions/snippets-tests
doc-deploy:
name: Deploy Doc to PROD
runs-on: ubuntu-latest
needs: [lint, unit-tests, documentation-snippets-tests, deploy-maven-central]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Extract references from context
shell: bash
id: extract-refs
run: |
echo "::set-output name=version::$(git describe --abbrev=0 --tags | cut -d. -f 1)"
echo "::set-output name=repo::$(echo $GITHUB_REPOSITORY | cut -d/ -f 2)"
echo "::set-output name=branch::$(echo $GITHUB_REF | cut -d/ -f 3)"
- uses: convictional/[email protected]
with:
owner: kuzzleio
repo: documentation
github_token: ${{ secrets.ACCESS_TOKEN_CI }}
workflow_file_name: child_repo.workflow.yml
ref: master
inputs: '{"repo_name": "${{ steps.extract-refs.outputs.repo }}", "branch": "${{ steps.extract-refs.outputs.branch }}", "version": "${{ steps.extract-refs.outputs.version }}"}'
deploy-maven-central:
name: Deploy to Maven Central
needs: [lint, unit-tests, documentation-snippets-tests]
runs-on: ubuntu-18.04
if: ${{ !startsWith( github.event.head_commit.message, '[no-deploy]') }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "11"
architecture: x64
- uses: ./.github/actions/deploy
with:
MAVEN_CENTRAL_GPG: ${{ secrets.MAVEN_CENTRAL_GPG }}
MAVEN_CENTRAL_GPG_PASSWORD: ${{ secrets.MAVEN_CENTRAL_GPG_PASSWORD }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}