From 26850a41e277a0ffb12478358f1edbca2c09a656 Mon Sep 17 00:00:00 2001 From: Owen Rumney Date: Fri, 7 Jan 2022 13:44:28 +0000 Subject: [PATCH] adding the release workflow --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5472c3d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: vsix-release +on: + push: + tags: + - "*" + +jobs: + build: + name: releasing vsix for extension + runs-on: ubuntu-latest + + steps: + - name: Checkout latest + uses: actions/checkout@v2 + + - name: Run npm install + run: npm install + + - name: run the package action + uses: lannonbr/vsce-action@3.0.0 + with: + args: "package -o tfsec.vsix" + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: true + prerelease: false + + - name: Attach artifact to release + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: tfsec.vsix + asset_name: tfsec.vsix + asset_content_type: application/vsix + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}