fix publish CI scripts to run only on correct release
This commit is contained in:
parent
05f08d3800
commit
20a5d57d23
2 changed files with 36 additions and 10 deletions
23
.github/workflows/main.yaml
vendored
23
.github/workflows/main.yaml
vendored
|
|
@ -1,14 +1,27 @@
|
|||
name: Publish Extension
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v0.8.*-vscode"
|
||||
branches:
|
||||
- main
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
jobs:
|
||||
check_release_name:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_run: ${{ steps.check.outputs.should_run }}
|
||||
steps:
|
||||
- id: check
|
||||
working-directory: .
|
||||
run: |
|
||||
if [[ "${{ github.event.release.tag_name }}" == v0.8.*-vscode ]]; then
|
||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "should_run=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build:
|
||||
needs: check_release_name
|
||||
if: needs.check_release_name.outputs.should_run == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
|
|
|||
23
.github/workflows/preview.yaml
vendored
23
.github/workflows/preview.yaml
vendored
|
|
@ -1,14 +1,27 @@
|
|||
name: Publish Preview Extension
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v0.9.*-vscode"
|
||||
branches:
|
||||
- dev
|
||||
release:
|
||||
types: [prereleased]
|
||||
|
||||
jobs:
|
||||
check_release_name:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should_run: ${{ steps.check.outputs.should_run }}
|
||||
steps:
|
||||
- id: check
|
||||
working-directory: .
|
||||
run: |
|
||||
if [[ "${{ github.event.release.tag_name }}" == v0.9.*-vscode ]]; then
|
||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "should_run=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build:
|
||||
needs: check_release_name
|
||||
if: needs.check_release_name.outputs.should_run == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue