Skip to content

Commit

Permalink
feat: use workflow (#129)
Browse files Browse the repository at this point in the history
* feat: use blocklet workflow

* chore(release): v0.5.5

* fix: sytax error in github-action yml

* sytax error in github-action yml

* fix: sytax error in github-action yml
  • Loading branch information
LancelotLewis authored Jan 29, 2022
1 parent 3f622c4 commit 69c5580
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 74 deletions.
68 changes: 46 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,55 @@ on:

jobs:
Deploy:

runs-on: ubuntu-latest

if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'

- name: Initialize
run: yarn global add @blocklet/cli && yarn

- name: Bundle
run: yarn bundle
env:
GATSBY_ALGOLIA_APP_ID: ${{ secrets.GATSBY_ALGOLIA_APP_ID }}
GATSBY_ALGOLIA_ADMIN_KEY: ${{ secrets.GATSBY_ALGOLIA_ADMIN_KEY }}
GATSBY_ALGOLIA_SEARCH_KEY: ${{ secrets.GATSBY_ALGOLIA_SEARCH_KEY }}
GATSBY_ALGOLIA_INDEX_NAME: ${{ secrets.GATSBY_ALGOLIA_INDEX_NAME }}

- name: Blocklet workflow
uses: blocklet/action-workflow@v1
with:
skip-upload: false
skip-deploy: false
skip-bundle: true
bundle-command: yarn bundle
server-endpoint: ${{ secrets.AWS_NODE_ENDPOINT }}
server-access-key: ${{ secrets.AWS_NODE_ACCESS_KEY }}
server-access-secret: ${{ secrets.AWS_NODE_ACCESS_SECRET }}
store-endpoint: ${{ secrets.STORE_ENDPOINT_PROD }}
store-access-token: ${{ secrets.STORE_ACCESS_TOKEN_PROD }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout repo
uses: actions/checkout@v2

- name: Deploy
env:
AWS_NODE_ENDPOINT: ${{ secrets.AWS_NODE_ENDPOINT }}
AWS_NODE_ACCESS_KEY: ${{ secrets.AWS_NODE_ACCESS_KEY }}
AWS_NODE_ACCESS_SECRET: ${{ secrets.AWS_NODE_ACCESS_SECRET }}
ALIYUN_NODE_ENDPOINT: ${{ secrets.ALIYUN_NODE_ENDPOINT }}
ALIYUN_NODE_ACCESS_SECRET: ${{ secrets.ALIYUN_NODE_ACCESS_SECRET }}
ALIYUN_NODE_ACCESS_KEY: ${{ secrets.ALIYUN_NODE_ACCESS_KEY }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_HUB_TOKEN: ${{ secrets.GIT_HUB_TOKEN }}
GATSBY_ALGOLIA_APP_ID: ${{ secrets.GATSBY_ALGOLIA_APP_ID }}
GATSBY_ALGOLIA_ADMIN_KEY: ${{ secrets.GATSBY_ALGOLIA_ADMIN_KEY }}
GATSBY_ALGOLIA_SEARCH_KEY: ${{ secrets.GATSBY_ALGOLIA_SEARCH_KEY }}
GATSBY_ALGOLIA_INDEX_NAME: ${{ secrets.GATSBY_ALGOLIA_INDEX_NAME }}
BLOCKLET_REGISTRY: ${{ secrets.BLOCKLET_REGISTRY }}
ABTNODE_DEV_SK: ${{ secrets.ABTNODE_DEV_SK }}
run: bash ./tools/publish.sh
- name: Blocklet workflow (ALIYUN)
uses: blocklet/action-workflow@v1
with:
skip-deps: true
skip-upload: true
skip-deploy: false
skip-release: true
skip-bundle: true
server-endpoint: ${{ secrets.ALIYUN_NODE_ENDPOINT }}
server-access-key: ${{ secrets.ALIYUN_NODE_ACCESS_KEY }}
server-access-secret: ${{ secrets.ALIYUN_NODE_ACCESS_SECRET }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.5 (一月 29, 2022)

- feat: use blocklet workflow

## 0.5.4 (一月 14, 2022)

- chore: update README
Expand Down
2 changes: 1 addition & 1 deletion blocklet.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: '@arcblock/abtnode-docs'
version: 0.5.4
version: 0.5.5
description: >-
Blocklet Server Documentation, a help documentation for quickly get started
with Blocklet Server.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arcblock/abtnode-docs",
"version": "0.5.4",
"version": "0.5.5",
"description": "Blocklet Server Documentation, a help documentation for quickly get started with Blocklet Server.",
"main": "index.js",
"publishConfig": {
Expand Down
49 changes: 0 additions & 49 deletions tools/publish.sh

This file was deleted.

2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.4
0.5.5

0 comments on commit 69c5580

Please sign in to comment.