Skip to content

Commit

Permalink
chore: Update publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Jul 20, 2023
1 parent 61f1372 commit 66fc3de
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/actions/summary/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Summary
description: Send markdown to the step summary

inputs:
text:
description: The markdown text to send.
required: true
runs:
using: "composite"
steps:
- name: write
shell: bash
env:
VALUE: ${{ inputs.text }}
run: |
echo "$VALUE" >> $GITHUB_STEP_SUMMARY
6 changes: 4 additions & 2 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ on:
type: choice
# Options are generated from `npm run gen:workflow`
options:
- "."
- "none"
- "all"
- extensions/arabic
- extensions/australian-english
- extensions/austrian-german
Expand Down Expand Up @@ -81,7 +82,7 @@ jobs:
- name: Choice
env:
INPUT_CHOICE: ${{ (inputs.extension && format('["{0}"]', inputs.extension)) }}
INPUT_CHOICE: ${{ (inputs.extension && (inputs.extension != 'all') && format('["{0}"]', inputs.extension) || '') }}
run: |
echo INPUT_CHOICE=$INPUT_CHOICE >> $GITHUB_ENV
Expand All @@ -102,6 +103,7 @@ jobs:
with:
ref: ${{ inputs.ref }}
paths_released: ${{ needs.list_extensions.outputs.extension_list }}
if: ${{ inputs.extension != 'none' }}
secrets:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ jobs:
if: ${{ env.PUB_FAIL_OVSX }}
run: echo "::error title=OVSX::Failed to Publish $EXTENSION_NAME to Eclipse Open VSX."

- name: Report Results
uses: ./.github/actions/summary
with:
text: |
- VSCE Publish ${{ env.EXTENSION_NAME }}: ${{ env.PUB_FAIL_VSCE && 'failed' || 'success' }}
- OVSX Publish ${{ env.EXTENSION_NAME }}: ${{ env.PUB_FAIL_OVSX && 'failed' || 'success' }}
- name: Check Build
if: ${{ env.PUB_FAIL_VSCE || env.PUB_FAIL_OVSX }}
run: exit 1
Expand Down

0 comments on commit 66fc3de

Please sign in to comment.