Skip to content

Merge pull request #53 from mateumiralles/dappnode-incentive-program-… #9

Merge pull request #53 from mateumiralles/dappnode-incentive-program-…

Merge pull request #53 from mateumiralles/dappnode-incentive-program-… #9

Workflow file for this run

name: Create Github Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Permission can be added at job level or workflow level
permissions:
contents: write # This is required for actions/checkout and create release
jobs:
release:
name: Github Release
runs-on: ubuntu-latest
steps:
- name: Create Github Release
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
if (!${{ toJson(github.ref_name) }}) {
core.setFailed("RELEASE_TAG is not defined.")
return;
}
try {
const response = await github.rest.repos.createRelease({
name: ${{ toJson(github.ref_name) }},
tag_name: ${{ toJson(github.ref_name) }},
draft: false,
generate_release_notes: true,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
});
core.exportVariable('RELEASE_ID', response.data.id);
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url);
} catch (error) {
core.setFailed(error.message);
}