Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Commit

Permalink
Add publishing the extension step to drone CI (#35)
Browse files Browse the repository at this point in the history
* Add publishing the extension step to drone CI

* Remove version in package.json and format Dockerfile
  • Loading branch information
rohithbalaji123 authored Mar 15, 2020
1 parent 4cd3b08 commit 64effe0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ steps:
- name: docker
path: /var/run/docker.sock

- name: upload and publish extension
image: docker
environment:
EXTENSION_ID:
from_secret: EXTENSION_ID
CLIENT_ID:
from_secret: CLIENT_ID
CLIENT_SECRET:
from_secret: CLIENT_SECRET
REFRESH_TOKEN:
from_secret: REFRESH_TOKEN
commands:
- docker run
--env EXTENSION_ID=$EXTENSION_ID
--env CLIENT_ID=$CLIENT_ID
--env CLIENT_SECRET=$CLIENT_SECRET
--env REFRESH_TOKEN=$REFRESH_TOKEN
short-ext
volumes:
- name: docker
path: /var/run/docker.sock

trigger:
event:
- tag
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ node_modules
/build

# Environmental variables
.env.development
.env.development

# macOS metadata
.DS_Store
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ ARG GIT_TAG
RUN apk add --no-cache zip
RUN yarn
RUN yarn build:production
RUN yarn global add chrome-webstore-upload-cli@1.2.0

CMD webstore upload --auto-publish \
--source build/short-ext.zip \
--extension-id $EXTENSION_ID \
--client-id $CLIENT_ID \
--client-secret $CLIENT_SECRET \
--refresh-token $REFRESH_TOKEN
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "Short",
"version": "0.0.6",
"description": "Visit short links with less typing",
"repository": {
"type": "git",
Expand Down

0 comments on commit 64effe0

Please sign in to comment.