Skip to content

Commit

Permalink
ci(workflows): [ci] add version output to metadata job
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Jan 31, 2023
1 parent 6aa1706 commit 5e9924f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
# - https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions
# - https://github.com/actions/cache
# - https://github.com/actions/cache/discussions/650
# - https://github.com/actions/checkout
Expand Down Expand Up @@ -45,6 +46,8 @@ jobs:
github.event_name == 'workflow_dispatch' ||
!startsWith(github.event.head_commit.message, 'release:')
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.result }}
steps:
- id: debug
name: Print environment variables and event payload
Expand All @@ -70,6 +73,9 @@ jobs:
with:
key: ${{ runner.os }}-${{ github.run_id }}
path: ${{ env.CACHE_PATH }}
- id: version
name: Get package version
run: echo "result=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
format:
needs: metadata
runs-on: ubuntu-latest
Expand Down Expand Up @@ -244,13 +250,10 @@ jobs:
- id: typecheck
name: Run typecheck
run: yarn check:types:build
- id: version
name: Get package version
run: echo "result=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
- id: archive
name: Archive production artifacts
uses: actions/[email protected]
with:
name: |
${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, steps.version.outputs.result) }}
${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, needs.metadata.outputs.version) }}
path: '*.tgz'

0 comments on commit 5e9924f

Please sign in to comment.