Skip to content

Commit 8799676

Browse files
committed
fix: update file uploader
1 parent 1bcaeff commit 8799676

File tree

1 file changed

+70
-104
lines changed

1 file changed

+70
-104
lines changed

.github/workflows/automated.yml

Lines changed: 70 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,70 @@
1-
name: CI
2-
"on":
3-
push:
4-
branches:
5-
- master
6-
jobs:
7-
about:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v3
12-
- name: setup nodejs
13-
uses: actions/setup-node@v3
14-
with:
15-
node-version: 16
16-
- name: Jaid/action-sync-node-meta
17-
uses: jaid/action-sync-node-meta@v2.0.0
18-
with:
19-
direction: overwrite-github
20-
githubToken: "${{ secrets.GITHUB }}"
21-
release:
22-
runs-on: ubuntu-latest
23-
steps:
24-
- name: Checkout
25-
uses: actions/checkout@v3
26-
- name: setup nodejs
27-
uses: actions/setup-node@v3
28-
with:
29-
node-version: 14
30-
- name: Semantic Release
31-
uses: cycjimmy/semantic-release-action@v3
32-
id: semantic
33-
with:
34-
extra_plugins: |
35-
@semantic-release/changelog
36-
@semantic-release/git
37-
@semantic-release/github
38-
env:
39-
GITHUB_TOKEN: "${{ secrets.GITHUB }}"
40-
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
41-
outputs:
42-
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
43-
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
44-
build:
45-
runs-on: ubuntu-latest
46-
needs: release
47-
if: needs.release.outputs.new_release_published == 'true'
48-
env:
49-
IMAGE: cocreateapps/cocreate-docs
50-
VERSION: ${{ needs.release.outputs.new_release_version }}
51-
steps:
52-
- uses: actions/checkout@v3
53-
- name: Login to DockerHub
54-
uses: docker/login-action@v2
55-
with:
56-
username: ${{ secrets.DOCKERHUB_USER }}
57-
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
58-
- name: docker build
59-
id: docker_build
60-
run: docker build . -t ${IMAGE}:latest -t ${IMAGE}:${VERSION}
61-
- name: docker push
62-
id: docker_push
63-
run: |
64-
docker push ${IMAGE}:latest
65-
docker push ${IMAGE}:${VERSION}
66-
upload:
67-
runs-on: ubuntu-latest
68-
69-
steps:
70-
- name: Checkout
71-
uses: actions/checkout@v3
72-
73-
- name: Setup Node.js
74-
uses: actions/setup-node@v3
75-
with:
76-
node-version: 16
77-
78-
- name: Get Environment Variables
79-
run: |
80-
echo "organization_id=${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
81-
echo "key=${{ secrets.COCREATE_KEY }}" >> $GITHUB_ENV
82-
echo "host=${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
83-
84-
- name: Install @cocreate/cli
85-
run: npm install -g @cocreate/cli
86-
87-
- name: CoCreate CLI Upload
88-
run: coc upload
89-
90-
# docs:
91-
# runs-on: ubuntu-latest
92-
# steps:
93-
# - name: Checkout
94-
# uses: actions/checkout@v3
95-
# - name: setup nodejs
96-
# uses: actions/setup-node@v3
97-
# with:
98-
# node-version: 16
99-
# - name: update documentation
100-
# uses: CoCreate-app/CoCreate-docs@master
101-
# env:
102-
# organization_id: ${{ secrets.COCREATE_ORGANIZATION_ID }}
103-
# key: ${{ secrets.COCREATE_KEY }}
104-
# host: ${{ secrets.COCREATE_HOST }}
1+
name: Automated Workflow
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
about:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: 16
16+
- name: Jaid/action-sync-node-meta
17+
uses: jaid/action-sync-node-meta@v1.4.0
18+
with:
19+
direction: overwrite-github
20+
githubToken: "${{ secrets.GITHUB }}"
21+
release:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 14
30+
- name: Semantic Release
31+
uses: cycjimmy/semantic-release-action@v3
32+
id: semantic
33+
with:
34+
extra_plugins: |
35+
@semantic-release/changelog
36+
@semantic-release/git
37+
@semantic-release/github
38+
env:
39+
GITHUB_TOKEN: "${{ secrets.GITHUB }}"
40+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
41+
outputs:
42+
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
43+
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
44+
upload:
45+
runs-on: ubuntu-latest
46+
needs: release
47+
if: needs.release.outputs.new_release_published == 'true'
48+
env:
49+
VERSION: "${{ needs.release.outputs.new_release_version }}"
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v3
53+
- name: Setup Node.js
54+
uses: actions/setup-node@v3
55+
with:
56+
node-version: 16
57+
- name: Set npm registry auth
58+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
59+
- name: Install dependencies
60+
run: yarn install
61+
- name: Build
62+
run: yarn build
63+
- name: Set Environment Variables
64+
run: |
65+
echo "organization_id=${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
66+
echo "key=${{ secrets.COCREATE_KEY }}" >> $GITHUB_ENV
67+
echo "host=${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
68+
- name: CoCreate Upload
69+
run: coc upload
70+

0 commit comments

Comments
 (0)