Skip to content

Commit 10c39d1

Browse files
authored
Merge pull request #123 from deepworks-net/develop/122-re-work-actions-structure-for-external-use-and-consistency
Pull Out Version Calculation
2 parents 1e81daa + e3cf5a7 commit 10c39d1

File tree

3 files changed

+35
-28
lines changed

3 files changed

+35
-28
lines changed

.github/workflows/create-release-tag.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/release-drafter.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
- staging
77
workflow_call:
88
inputs:
9+
github-action-repo:
10+
description: 'The Action Repository (If using a forked repository)'
11+
required: false
12+
type: string
13+
default: 'deepworks-net/github.actions'
914
draft:
1015
description: 'Create as draft release'
1116
required: false
@@ -34,7 +39,7 @@ jobs:
3439
fetch-depth: 0
3540

3641
- name: Calculate Next Version
37-
uses: ${{ github.action_path }}/actions/version_calculation@main
42+
uses: ${{ inputs.github-action-repo }}/github.actions/actions/version_calculation@main
3843
id: version
3944

4045
- name: Draft Release
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Version Calculation
2+
3+
on:
4+
push:
5+
branches:
6+
- main # or master, depending on your default branch
7+
workflow_dispatch: # allows manual triggering
8+
workflow_call:
9+
secrets:
10+
token:
11+
description: 'GitHub Repository Token'
12+
required: false
13+
jobs:
14+
calculate-version:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0 # Important: fetch all history and tags
22+
23+
- name: Calculate next version
24+
id: version
25+
uses: deepworks-net/github.actions/actions/version-calculation@develop/122-re-work-actions-structure-for-external-use-and-consistency # Path to your local action
26+
27+
# Optional: You can use the calculated version in subsequent steps
28+
- name: Display calculated version
29+
run: echo "Next version will be ${{ steps.version.outputs.next_version }}"

0 commit comments

Comments
 (0)