Skip to content

Commit

Permalink
build.yml: Use step IDs to retrieve artifact URL
Browse files Browse the repository at this point in the history
  • Loading branch information
abraxa committed Aug 27, 2024
1 parent 4733fa8 commit 54bf428
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ jobs:
mv pulseview-*installer.exe pulseview-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-${{ matrix.build_type.name }}-installer.exe
- name: Upload artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: artifact-pulseview-${{ matrix.target.target }}-${{ matrix.build_type.name }}-mxe
Expand All @@ -136,7 +137,7 @@ jobs:
# Only relevant for pull requests
if: (github.event_name == 'pull_request')
run: |
echo "PR_LINKS=$PR_LINKS | pulseview-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-${{ matrix.build_type.name }}-installer.exe | ${{ env[format('steps.upload_pulseview-{0}_{1}_mxe_artifact.outputs.artifact-url', env.TARGET, env.BUILD_TYPE)] }}" >> $GITHUB_ENV
echo "PR_LINKS=$PR_LINKS | pulseview-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-${{ matrix.build_type.name }}-installer.exe | ${{ steps.upload.outputs.artifact-url }}" >> $GITHUB_ENV
build_sigrok-cli_mxe:
Expand Down Expand Up @@ -225,6 +226,7 @@ jobs:
mv sigrok-cli-*installer.exe sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug-installer.exe
- name: Upload artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: artifact-sigrok-cli-${{ matrix.target.target }}-mxe
Expand All @@ -234,7 +236,7 @@ jobs:
# Only relevant for pull requests
if: (github.event_name == 'pull_request')
run: |
echo "PR_LINKS=$PR_LINKS | sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug-installer.exe | ${{ env[format('steps.upload_sigrok-cli_{0}_debug_mxe_artifact.outputs.artifact-url', env.TARGET)] }}" >> $GITHUB_ENV
echo "PR_LINKS=$PR_LINKS | sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug-installer.exe | ${{ steps.upload.outputs.artifact-url }}" >> $GITHUB_ENV
build_pulseview_appimage:
Expand Down Expand Up @@ -350,6 +352,7 @@ jobs:
mv PulseView-*.AppImage pulseview-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-${{ matrix.build_type.name }}.appimage
- name: Upload artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: artifact-pulseview-${{ matrix.target.target }}-${{ matrix.build_type.name }}-appimage
Expand All @@ -359,7 +362,7 @@ jobs:
# Only relevant for pull requests
if: (github.event_name == 'pull_request')
run: |
echo "PR_LINKS=$PR_LINKS | pulseview-${{ matrix.target.target }}-${{ matrix.build_type.name }}-appimage | ${{ env[format('steps.upload_pulseview-{0}_{1}_appimage_artifact.outputs.artifact-url', env.TARGET, env.BUILD_TYPE)] }}" >> $GITHUB_ENV
echo "PR_LINKS=$PR_LINKS | pulseview-${{ matrix.target.target }}-${{ matrix.build_type.name }}-appimage | ${{ steps.upload.outputs.artifact-url }}" >> $GITHUB_ENV
build_sigrok-cli_appimage:
Expand Down Expand Up @@ -468,22 +471,17 @@ jobs:
mv sigrok-cli-*.AppImage sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug.appimage
- name: Upload artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: artifact-sigrok-cli-${{ matrix.target.target }}-appimage
path: sigrok-build/ci/appimage/appimage-build/sigrok-cli-*.appimage

- name: Output artifact URL to log
# Only relevant for pull requests
if: (github.event_name == 'pull_request')
run: |
echo 'Artifact URL is ${{ steps.upload_sigrok-cli_appimage_artifact.outputs.artifact-url }}'
- name: Add artifact to pull request message
# Only relevant for pull requests
if: (github.event_name == 'pull_request')
run: |
echo "PR_LINKS=$PR_LINKS | sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug.appimage | ${{ env[format('steps.upload_sigrok-cli_{0}_appimage_artifact.outputs.artifact-url', env.TARGET)] }}" >> $GITHUB_ENV
echo "PR_LINKS=$PR_LINKS | sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ matrix.target.target }}-debug.appimage | ${{ steps.upload.outputs.artifact-url }}" >> $GITHUB_ENV
build_pulseview_macos:
Expand Down Expand Up @@ -577,6 +575,7 @@ jobs:
./sigrok-macos-create-dmg.sh
- name: Upload artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: artifact-pulseview-macos
Expand All @@ -586,7 +585,7 @@ jobs:
# Only relevant for pull requests
if: (github.event_name == 'pull_request')
run: |
echo "PR_LINKS=$PR_LINKS | pulseview-${{ env.ARTIFACT_VERSION }}-${{ env.TARGET }}.dmg | ${{ steps.upload_pulseview_appimage_artifact.outputs.artifact-url }}" >> $GITHUB_ENV
echo "PR_LINKS=$PR_LINKS | pulseview-${{ env.ARTIFACT_VERSION }}-${{ env.TARGET }}.dmg | ${{ steps.upload.outputs.artifact-url }}" >> $GITHUB_ENV
build_sigrok-cli_macos:
Expand Down Expand Up @@ -664,6 +663,7 @@ jobs:
./sigrok-macos-create-dmg.sh
- name: Upload artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: artifact-sigrok-cli-macos
Expand All @@ -673,7 +673,7 @@ jobs:
# Only relevant for pull requests
if: (github.event_name == 'pull_request')
run: |
echo "PR_LINKS=$PR_LINKS | sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ env.TARGET }}.dmg | ${{ steps.upload_sigrok-cli_dmg_artifact.outputs.artifact-url', matrix.target.target }}" >> $GITHUB_ENV
echo "PR_LINKS=$PR_LINKS | sigrok-cli-${{ env.ARTIFACT_VERSION }}-${{ env.TARGET }}.dmg | ${{ steps.upload.outputs.artifact-url }}" >> $GITHUB_ENV
continuous_release_pulseview:
Expand Down

0 comments on commit 54bf428

Please sign in to comment.