Skip to content

Commit

Permalink
ci: create workflows for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jpedroschmitz committed Jan 18, 2021
1 parent b833215 commit e513ed5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1

- run: npm install && mkdir -p ./bin

- run: npm run package

- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/omni.vsix
asset_name: omni.vsix
asset_content_type: application/octet-stream
17 changes: 17 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Deploy Release

on:
release:
types:
- published

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm install
- env:
VSCE_PUBLISHER_TOKEN: ${{ secrets.VSCE_PUBLISHER_TOKEN }}
run: npm run vsce-publish -- -p $VSCE_PUBLISHER_TOKEN

0 comments on commit e513ed5

Please sign in to comment.