vsc-material-theme/.github/workflows/release.yml
2020-09-05 11:48:37 +02:00

48 lines
1.1 KiB
YAML

name: Release Extension
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- '*'
jobs:
release:
runs-on: ubuntu-latest
if: contains(github.ref, 'tag')
steps:
- uses: actions/checkout@v2
- name: Use Node Version 12
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn --frozen-lockfile
if: steps.cache-yarn-cache.outputs.cache-hit != 'true' || steps.cache-node-modules.outputs.cache-hit != 'true'
- name: Build extension
run: yarn build
- uses: lannonbr/vsce-action@master
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}