-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f72969e
commit 414da90
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|