Skip to content

Commit

Permalink
Upgrade to action.yml (#2)
Browse files Browse the repository at this point in the history
Upgrade to action.yml
  • Loading branch information
lannonbr authored Dec 22, 2019
2 parents 75a30e3 + 117f645 commit 704da57
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 39 deletions.
13 changes: 1 addition & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
FROM node:10-slim

LABEL version="1.0.1"
LABEL repository="https://github/lannonbr/vsce-action"
LABEL homepage="https://github/lannonbr/vsce-action"
LABEL maintainer="Benjamin Lannon <benjamin@lannonbr.com>"

LABEL com.github.actions.name="GitHub Action for vsce"
LABEL com.github.actions.description="Wraps the vsce CLI to be used in GitHub Actions."
LABEL com.github.actions.icon="package"
LABEL com.github.actions.color="green"

RUN npm i -g vsce

COPY "entrypoint.sh" "/entrypoint.sh"
ENTRYPOINT ["/entrypoint.sh"]
CMD ["help"]
ENTRYPOINT ["/entrypoint.sh"]
44 changes: 17 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,23 @@ It will enable workflows to easily deploy your VS Code extensions to the marketp

Here's an example workflow which publishes an extension when you push to the master branch.

```workflow
workflow "Deploy Extension" {
on = "push"
resolves = ["Publish"]
}
# Install npm dependencies
# Note: --unsafe-perm is used as GitHub Actions does not run `npm run post-install` without it for some reason.
action "npm install" {
uses = "actions/npm@33871a7"
args = ["install", "--unsafe-perm"]
}
# Check for master branch
action "Master" {
uses = "actions/bin/filter@master"
args = "branch master"
needs = ["npm install"]
}
# publish extension
action "Publish" {
uses = "lannonbr/vsce-action@master"
args = "publish -p $VSCE_TOKEN"
needs = ["Master"]
secrets = ["VSCE_TOKEN"]
}
```yaml
on:
push:
branches:
- master
name: Deploy Extension
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- uses: lannonbr/vsce-action@master
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
```
# Secrets
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: "GitHub Action for vsce"
description: "Wraps the vsce CLI to be used in GitHub Actions"
runs:
using: "docker"
image: "Dockerfile"
branding:
icon: package
color: green

0 comments on commit 704da57

Please sign in to comment.