Skip to content

Commit

Permalink
New flow
Browse files Browse the repository at this point in the history
this flow will only publish when there is a new version number in pkg json
  • Loading branch information
DominicVonk committed Dec 28, 2020
1 parent 02a28a6 commit d36d8d3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,31 @@ on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Release
uses: justincy/github-action-npm-release@2.0.2
id: release
outputs:
released: ${{ steps.release.outputs.released }}
build:
needs: release
# The type of runner that the job will run on
runs-on: ubuntu-latest

if: ${{ needs.release.outputs.released == 'true' }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -29,4 +41,4 @@ jobs:
node-version: '12'
- run: npm install
# Runs a single command using the runners shell
- run: npx vsce publish -p ${{ secrets.VSCE_TOKEN }}
- run: npx vsce publish -p ${{ secrets.VSCE_TOKEN }}

0 comments on commit d36d8d3

Please sign in to comment.