Skip to content

Commit 51c0934

Browse files
author
Bastian Schwarz
committed
Created new updateRelease versions workflow
1 parent 5a60e97 commit 51c0934

8 files changed

Lines changed: 127 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Update Release Versions
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
description: "The version that was just released (semver compliant)"
8+
required: true
9+
type: string
10+
release_ref:
11+
description: "The ref the release versions should point to"
12+
required: true
13+
type: string
14+
15+
jobs:
16+
parse_version:
17+
name: Parse Version
18+
runs-on: ubuntu-latest
19+
outputs:
20+
major: ${{ steps.parse.outputs.major }}
21+
minor: ${{ steps.parse.outputs.minor }}
22+
patch: ${{ steps.parse.outputs.patch }}
23+
steps:
24+
- name: Parse version
25+
id: parse
26+
run: |
27+
echo "major=$(echo ${{ github.event.inputs.version }} | cut -d '.' -f 1)" >> $GITHUB_OUTPUT
28+
echo "minor=$(echo ${{ github.event.inputs.version }} | cut -d '.' -f 2)" >> $GITHUB_OUTPUT
29+
echo "patch=$(echo ${{ github.event.inputs.version }} | cut -d '.' -f 3)" >> $GITHUB_OUTPUT
30+
31+
- uses: actions/checkout@v3
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Update tags
36+
run: |
37+
MAJOR="${{ steps.parse.outputs.major }}"
38+
MINOR="${{ steps.parse.outputs.major }}.${{ steps.parse.outputs.major }}"
39+
TARGET="${{ github.event.inputs.release_ref }}"
40+
git tag -f $MAJOR $TARGET
41+
git tag -f $MINOR $TARGET
42+
git push origin $MAJOR $MINOR --force

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jsonSchemas.xml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workflows.common.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)