generated from CoCreate-app/CoCreate-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 2
104 lines (98 loc) · 3.56 KB
/
automated.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
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CI
"on":
push:
branches:
- master
jobs:
about:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: setup nodejs
uses: actions/setup-node@v3
with:
node-version: 16
- name: Jaid/action-sync-node-meta
uses: jaid/[email protected]
with:
direction: overwrite-github
githubToken: "${{ secrets.GITHUB }}"
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: setup nodejs
uses: actions/setup-node@v3
with:
node-version: 14
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/github
env:
GITHUB_TOKEN: "${{ secrets.GITHUB }}"
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
outputs:
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
build:
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.new_release_published == 'true'
env:
IMAGE: cocreateapps/cocreate-docs
VERSION: ${{ needs.release.outputs.new_release_version }}
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: docker build
id: docker_build
run: docker build . -t ${IMAGE}:latest -t ${IMAGE}:${VERSION}
- name: docker push
id: docker_push
run: |
docker push ${IMAGE}:latest
docker push ${IMAGE}:${VERSION}
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Get Environment Variables
run: |
echo "organization_id=${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
echo "key=${{ secrets.COCREATE_KEY }}" >> $GITHUB_ENV
echo "host=${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
- name: Install @cocreate/cli
run: npm install -g @cocreate/cli
- name: CoCreate CLI Upload
run: coc upload
# docs:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: setup nodejs
# uses: actions/setup-node@v3
# with:
# node-version: 16
# - name: update documentation
# uses: CoCreate-app/CoCreate-docs@master
# env:
# organization_id: ${{ secrets.COCREATE_ORGANIZATION_ID }}
# key: ${{ secrets.COCREATE_KEY }}
# host: ${{ secrets.COCREATE_HOST }}