You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vscode-sshfs/.github/workflows/build-extension.yml

74 lines
2.1 KiB

name: Build extension
on:
push:
tags: '**'
branches:
- '*'
- 'feature/**'
- 'release/**'
pull_request:
types: [opened, synchronize]
branches:
- '*'
- 'feature/**'
- 'release/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-18.04
name: Build and package
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Event Utilities
uses: SchoofsKelvin/event-utilities@v1
id: utils
with:
artifact_prefix: "vscode-sshfs"
artifact_extension: "vsix"
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install VSCE
run: |
yarn global add vsce
echo "$(yarn global bin)" >> $GITHUB_PATH
- name: Install dependencies in /
run: yarn --frozen-lockfile
- name: Install dependencies in /webview/
working-directory: webview
run: yarn --frozen-lockfile
- name: Build extension
run: vsce package -o ${{ steps.utils.outputs.artifact_name }}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.1
with:
name: ${{ steps.utils.outputs.artifact_name }}
path: ${{ steps.utils.outputs.artifact_name }}
if-no-files-found: error
- name: Create release
id: create_release
if: ${{ success() && steps.utils.outputs.tag_version }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.utils.outputs.tag_version }}
draft: true
- name: Upload release asset
id: upload_release_asset
if: ${{ success() && steps.utils.outputs.tag_version }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.utils.outputs.artifact_name }}
asset_name: ${{ steps.utils.outputs.artifact_name }}
asset_content_type: application/vsix