My objective is to create a GitHub action that, when the release.yml file changes, would either update an existing release or create a new release after checking if that release version is new checking against the previous commit. Ultimately would like to add this to other projects where I would like to add actions and release.yml.
The current issue I am having is difficulty in wrapping my head around how to go about is detecting changes in the release.yml file against the version.
For the very basic use case of adding a new release a simple approach of creating action.yml and adding
version_1_0: # id of input
description: '1.0'
required: true
default: 'The most important changes are downgrading the artifact to java7 (from 8) and switching to gmavenplus plugin to compile groovy.
Besides that, there is a lot of restructuring inside of the pom.xml file
# Misc
* Polishing (f2ec0bb, 9e2ae89 and 8654493)
_Reviewed by_: @user'
and later in index.js file
const version = core.getInput('version_1_0');
core.setOutput("ver", version);
gives the output which later in the GitHub actions file can be fetched and cleaned and later forwarded to the release step to be used to create the release
description=$
echo $description
description="${description//'%'/'%25'}"
description="${description//$'\n'/'%0A'}"
description="${description//$'\r'/'%0D'}"
echo $description
echo "::set-output name=test::$description"
Unfortunately, this approach proved insufficient when I attempt for a file-based trigger based on diffs.
sample release.yml
1.0:
body:
'The most important changes are downgrading the artifact to java7 (from 8) and switching to gmavenplus plugin to compile groovy.
Besides that, there is a lot of restructuring inside of the pom.xml file
# Misc
* Polishing (f2ec0bb, 9e2ae89 and 8654493)
_Reviewed by_: @user'
2.0: body: 'The most important changes are downgrading the artifact to java7 (from 8) and switching to gmavenplus plugin to compile groovy.
# Misc
* Polishing (f2ec0bb, 9e2ae89 and 8654493)
_Reviewed by_: @user'
from get changes against version number in customised release.yml file
No comments:
Post a Comment