Skip to content

Commit 6f8802a

Browse files
committed
fix: automated and manual workflows
1 parent 3e81d0f commit 6f8802a

File tree

3 files changed

+128
-45
lines changed

3 files changed

+128
-45
lines changed

.github/workflows/automated.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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@v2
12+
- name: Jaid/action-sync-node-meta
13+
uses: jaid/[email protected]
14+
with:
15+
direction: overwrite-github
16+
githubToken: "${{ secrets.GITHUB }}"
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
- name: Semantic Release
23+
uses: cycjimmy/semantic-release-action@v2
24+
id: semantic
25+
with:
26+
extra_plugins: |
27+
@semantic-release/changelog
28+
@semantic-release/npm
29+
@semantic-release/git
30+
@semantic-release/github
31+
env:
32+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
33+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
34+
outputs:
35+
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
36+
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
37+
cdn:
38+
runs-on: ubuntu-latest
39+
needs: release
40+
if: needs.release.outputs.new_release_published == 'true'
41+
env:
42+
VERSION: "${{ needs.release.outputs.new_release_version }}"
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v2
46+
- name: setup nodejs
47+
uses: actions/setup-node@v2
48+
with:
49+
node-version: 14.15.4
50+
- name: yarn install
51+
run: >
52+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
53+
.npmrc
54+
55+
yarn install
56+
- name: yarn build
57+
run: yarn build
58+
- name: upload bundle as version
59+
uses: CoCreate-app/CoCreate-s3@master
60+
with:
61+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
62+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
63+
bucket: testcrudbucket
64+
source: ./dist
65+
destination: "/kanban/${{env.VERSION}}"
66+
acl: public-read
67+
- name: upload bundle as latest
68+
uses: CoCreate-app/CoCreate-s3@master
69+
with:
70+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
71+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
72+
bucket: testcrudbucket
73+
source: ./dist
74+
destination: /kanban/latest
75+
acl: public-read
76+
invalidations: true
77+
docs:
78+
runs-on: ubuntu-latest
79+
steps:
80+
- name: Checkout
81+
uses: actions/checkout@v2
82+
83+
- name: update documentation
84+
uses: CoCreate-app/CoCreate-docs@master

.github/workflows/automation.yml

-45
This file was deleted.

.github/workflows/manual.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Manual Workflow
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
invalidations:
6+
description: |
7+
If set to 'true', invalidates previous upload.
8+
default: "true"
9+
required: true
10+
11+
jobs:
12+
cdn:
13+
runs-on: ubuntu-latest
14+
env:
15+
DRY_RUN: ${{ github.event.inputs.dry_run }}
16+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
17+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
- name: setup nodejs
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: 14.15.4
26+
- name: yarn install
27+
run: >
28+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
29+
.npmrc
30+
31+
yarn install
32+
- name: yarn build
33+
run: yarn build
34+
- name: upload latest bundle
35+
uses: CoCreate-app/CoCreate-s3@master
36+
with:
37+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
38+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
39+
distributionId: "${{ secrets.DISTRIBUTION_ID }}"
40+
bucket: testcrudbucket
41+
source: ./dist
42+
destination: /kanban/latest
43+
acl: public-read
44+
invalidations: ${{ github.event.inputs.invalidations }}

0 commit comments

Comments
 (0)