Skip to content

Commit

Permalink
fix: get asset name
Browse files Browse the repository at this point in the history
  • Loading branch information
mikirov committed Jul 27, 2023
1 parent d2a1ed2 commit 9da1915
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions .github/workflows/cumulus-stack-overflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,54 +21,44 @@ jobs:
with:
owner: paritytech
repo: polkadot
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

- name: Fetch Github Release Asset from polkadot
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "paritytech/polkadot"
version: "tags/${{ steps.latestrelease_polkadot.outputs.tag_name }}"
file: "${{ steps.latestrelease_polkadot.outputs.assets[0].name }}"
target: "polkadot.bin"
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

- name: Get latest polkadot-parachains release info
id: latestrelease_parachains
uses: abatilo/[email protected]
with:
owner: paritytech
repo: polkadot-parachains
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

- name: Fetch Github Release Asset from polkadot-parachains
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "paritytech/polkadot-parachains"
version: "tags/${{ steps.latestrelease_parachains.outputs.tag_name }}"
file: "${{ steps.latestrelease_parachains.outputs.assets[0].name }}"
target: "polkadot-parachains.bin"
file: "polkadot"
target: "polkadot"
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}


- name: Add binaries to PATH
run: |
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
chmod +x polkadot.bin
chmod +x polkadot-parachains.bin
chmod +x polkadot
- name: Get latest cumulus release info
id: latestrelease_cumulus
uses: abatilo/[email protected]
with:
owner: paritytech
repo: cumulus
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}


- name: Get latest release asset name
id: latestrelease_cumulus_asset_name
run: |
asset_name=$(curl --silent "https://api.github.com/repos/<OWNER>/<REPO>/releases/latest" | jq -r '.assets[0].name')
echo "::set-output name=asset_name::$asset_name"
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

- name: Fetch Github Release Asset from cumulus
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "paritytech/cumulus"
version: "tags/${{ steps.latestrelease_cumulus.outputs.tag_name }}"
file: "${{ steps.latestrelease_cumulus.outputs.assets[0].name }}"
file: "${{ steps.latestrelease_cumulus_asset_name.outputs.asset_name }}"
target: "test.wasm"
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

Expand Down

0 comments on commit 9da1915

Please sign in to comment.