Skip to content

Commit

Permalink
CI: upload snap release
Browse files Browse the repository at this point in the history
Modified the `needs` context to access `upload_url` within the
`snap_pkg` job.
  • Loading branch information
Mersho committed Feb 26, 2024
1 parent aafd5d0 commit 7f8b5d6
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,22 @@ jobs:
draft: false
prerelease: false

- name: Upload snap package As Release Asset
id: upload_snap_asset
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.prepare.outputs.upload_url }}
asset_path: ${{ steps.find_snap_file.outputs.file_path }}
asset_name: ${{ steps.find_snap_file.outputs.file_name }}
asset_content_type: application/octet-stream

snap_pkg_beta:

needs:
- conventions
- snap_pkg

runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -614,3 +626,15 @@ jobs:
run: |
sudo apt update
./scripts/snap_release.sh beta
- name: Upload snap beta package As Release Asset
id: upload_snap_beta_asset
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.snap_pkg.outputs.upload_url }}
asset_path: ${{ steps.find_snap_beta_file.outputs.file_path }}
asset_name: ${{ steps.find_snap_beta_file.outputs.file_name }}
asset_content_type: application/octet-stream

0 comments on commit 7f8b5d6

Please sign in to comment.