Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #33

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #33

on:
push:
branches:
- '**'
pull_request:
release:
types: [released]
name: packageAndPublish
jobs:
package:
name: Package Extension
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- run: npm install
- name: Package
run: npm run package
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: extension-artifact
path: ./*.vsix
publish:
needs: package
name: Publish Extension
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- run: npm install
- uses: actions/[email protected]
with:
name: extension-artifact
path: ./
- name: Determine Artifact Name
run: echo "ARTIFACT_NAME=$(ls *.vsix)" >> $GITHUB_ENV
- name: Determine Url for Uploading Artifact to Release
run: echo "UPLOAD_URL=$(curl -sL https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.upload_url')" >> $GITHUB_ENV
- name: Upload Extension to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./${{ env.ARTIFACT_NAME }}
asset_name: ${{ env.ARTIFACT_NAME }}
asset_content_type: application/zip
- name: Publish Extension to Visual Studio Marketplace
run: npm run publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}