Skip to content

Commit

Permalink
Use release in gen mani action
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas-Richard authored Dec 15, 2023
1 parent f72969e commit 414da90
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/generate-manifests-demos.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Generate manifests for demo
on: [push]

env:
USE_RELEASE: true
RELEASE_TAG: v0.1.0

jobs:
build-and-run:
runs-on: ubuntu-latest
Expand All @@ -13,7 +17,25 @@ jobs:
git config --global user.name 'Bot'
git config --global user.email '[email protected]'
- name: Download mani-diffy binary
if: env.USE_RELEASE == 'true'
uses: actions/github-script@v5
with:
script: |
const { owner, repo } = context.repo
const release = await github.rest.repos.getReleaseByTag({
owner,
repo,
tag: core.getInput('release_tag')
})
const asset = release.data.assets.find(asset => asset.name === 'mani-diffy')
const downloadUrl = asset.browser_download_url
await exec.exec('wget', ['-O', 'mani-diffy', downloadUrl])
await exec.exec('chmod', ['+x', 'mani-diffy'])
release_tag: ${{ env.RELEASE_TAG }}

- name: Compile
if: env.USE_RELEASE == 'false'
run: |
make build-binaries
Expand Down

0 comments on commit 414da90

Please sign in to comment.