Skip to content

WIP: release workflow #11

WIP: release workflow

WIP: release workflow #11

Workflow file for this run

name: Debug
on: [pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
outputs:
focalVersion: ${{ (steps.jq.outputs.output).focal }}
focalAtomVersion: ${{ (steps.jq.outputs.output).focalAtom }}
env:
published: false
TEST: '[{"name": "@grammarly/focal", "version": "1.2.0"}, {"name": "@grammarly/focal-atom", "version": "0.8.9"}]'
steps:
# - uses: hmarr/debug-action@v2
- run: 'echo "json: $TEST"'
# - run: echo ${{ fromJson(env.TEST) }}
- uses: edwardgeorge/jq-action@v1
if: ${{ env.published == 'true' }}
id: jq
with:
input: ${{ env.TEST }}
script: 'map({ key: .name, value: .version }) | from_entries | { focal: .["@grammarly/focal"], focalAtom: .["@grammarly/focal-atom"] }'
- run: 'echo "${{ steps.jq.outputs.output }}"'
- if: ${{ fromJson(steps.jq.outputs.output).focal }}
run: echo "Found @grammarly/focal ${{ fromJson(steps.jq.outputs.output).focal }}"
- if: ${{ fromJson(steps.jq.outputs.output)['focalAtom'] }}
run: echo "Found @grammarly/focal ${{ fromJson(steps.jq.outputs.output)['focalAtom'] }}"
publish:
needs: build
runs-on: ubuntu-latest
steps:
- run: 'echo "focal ${{ needs.build.outputs.focalVersion }}"'
- run: 'echo "focal-atom ${{ needs.build.outputs.focalAtomVersion }}"'