Skip to content

Commit

Permalink
CI: Use workflow inputs/outputs rather than artifacts to convey info.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamirTalwar committed Aug 16, 2020
1 parent 32c55e8 commit 72c8619
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
release:
name: Release
runs-on: ubuntu-20.04
outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- id: create_release
uses: actions/create-release@v1
Expand All @@ -18,11 +20,6 @@ jobs:
release_name: ${{ github.ref }}
body: ${{ github.ref }}
draft: true
- run: echo "${{ steps.create_release.outputs.upload_url }}" > release_upload_url.txt
- uses: actions/upload-artifact@v2
with:
name: release_upload_url
path: release_upload_url.txt

publish-unix:
name: Release
Expand All @@ -47,12 +44,6 @@ jobs:
key: v1-${{ matrix.os }}-stack-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
- run: make smoke.cabal
- run: make out/build/release/smoke
- uses: actions/download-artifact@v2
with:
name: release_upload_url
- id: release
run: |
echo ::set-output name=upload_url::"$(cat release_upload_url/release_upload_url.txt)"
- id: asset
run: |
export TAG="${{ github.ref }}"
Expand All @@ -66,7 +57,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
upload_url: ${{ needs.release.outputs.release_upload_url }}
asset_name: ${{ steps.asset.outputs.asset_name }}
asset_path: ${{ steps.asset.outputs.asset_path }}
asset_content_type: application/octet-stream

0 comments on commit 72c8619

Please sign in to comment.