Automatic weekly build update (#31) #8
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
name: Create CORE-Release | |
on: | |
push: | |
branches: main | |
paths: "05-matrix/github_action_matrix_all.json" | |
workflow_dispatch: | |
inputs: | |
tag_suffix: | |
description: 'Tag suffix' | |
default: 0 | |
required: true | |
type: string | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
create_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set version from date | |
id: tag_id | |
run: | | |
TAG=$(jq '.r_version[-1]' -r 05-matrix/github_action_matrix_all.json) | |
VAR="${{ github.event.inputs.tag_suffix }}" | |
if [[ ${VAR} == "" || ${VAR} == "0" ]]; then | |
CTAG="${TAG}" | |
else | |
CTAG="${TAG}-${VAR}" | |
fi | |
echo "ctag=${CTAG}" >>$GITHUB_OUTPUT | |
- name: Set prerelease name | |
id: release_id | |
run: | | |
RELEASENAME="R${{ steps.tag_id.outputs.ctag }} (CORE)" | |
echo "releasename=${RELEASENAME}" >>$GITHUB_OUTPUT | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
default_bump: false | |
custom_tag: ${{ steps.tag_id.outputs.ctag }} | |
tag_prefix: "R" | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: ${{ steps.release_id.outputs.releasename }} | |
generateReleaseNotes: true | |
allowUpdates: false | |
token: ${{ secrets.GITHUB_TOKEN }} |