Files
runner-images/.github/workflows/update_github_release.yml
Vladimir Safonkin ba79bba9d5 Add workflows to create software PRs and GitHub releases (#1123)
* Add workflows to create software PR and release

* Fix job names

* Minor fix

* Rework workflows
2020-07-01 16:32:10 +03:00

31 lines
861 B
YAML

name: Update release
on:
repository_dispatch:
types: [update-github-release]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update release for ${{ github.event.client_payload.ReleaseBranchName }}
uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const response = await github.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: "${{ github.event.client_payload.ReleaseBranchName }}"
});
github.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: response.data.id,
prerelease: ${{ github.event.client_payload.Prerelease }}
});