Skip to content

Commit

Permalink
add package action
Browse files Browse the repository at this point in the history
  • Loading branch information
lirc572 committed Jan 11, 2021
1 parent c4986f3 commit 0d47392
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Package Extension

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up npm vsce
run: |
sudo npm install vsce -g
- name: Package extension
run: |
vsce package
ls
VSIXFN=$(ls *.vsix)
echo "vsixfn=${VSIXFN}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./${{ env.vsixfn }}
asset_name: ${{ env.vsixfn }}
asset_content_type: application/octet-stream
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# TD-VSC

![package](https://github.com/lirc572/TD-VSC/workflows/Package%20Extension/badge.svg)

## Commands:

| Command | Description |
Expand Down

0 comments on commit 0d47392

Please sign in to comment.