Skip to content

Commit 96754a4

Browse files
committed
moved create release shell scripts to tools/scripts/release dir
1 parent e59832c commit 96754a4

File tree

7 files changed

+40
-41
lines changed

7 files changed

+40
-41
lines changed

.github/workflows/auto-version-bump.yaml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,39 @@ on:
99

1010
jobs:
1111
bump-version:
12-
name: Bump version
13-
runs-on: ubuntu-latest
14-
env:
15-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
16-
RELEASE_TAG: ${{github.event.inputs.VERSION}}
17-
REPOSITORY: ${{github.repository}}
18-
19-
steps:
20-
- name: Checkout code
21-
uses: actions/checkout@v4
22-
with:
23-
fetch-depth: 0
24-
25-
- name: Generate sec-scanners-config
26-
run: |
27-
echo "Creating sec-scanners-config.yaml"
28-
./.github/workflows/scripts/render-sec-scanners-config.sh ${RELEASE_TAG}
29-
30-
- name: Check if generated sec-scanners-config differs and commit
31-
run: |
32-
if [ -z "$(git status --porcelain)" ]; then
33-
echo "No changes found"
34-
else
35-
echo "Changes found. Commiting to repo"
36-
echo "bumped sec-scanners-config.yaml to ${RELEASE_TAG}"
37-
git config --global user.email "[email protected]"
38-
git config --global user.name "Test Test"
39-
git add ./sec-scanners-config.yaml
40-
git commit -m "bumped sec-scanners-config.yaml to ${RELEASE_TAG}"
41-
git push
42-
fi
43-
12+
name: Bump version
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
16+
RELEASE_TAG: ${{github.event.inputs.VERSION}}
17+
REPOSITORY: ${{github.repository}}
4418

45-
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
4624

25+
- name: Generate sec-scanners-config
26+
run: |
27+
echo "Creating sec-scanners-config.yaml"
28+
./tools/scripts/release/render-sec-scanners-config.sh ${RELEASE_TAG}
29+
30+
- name: Generate sec-scanners-config-release
31+
run: |
32+
echo "Creating sec-scanners-config-release.yaml"
33+
./tools/scripts/release/render-sec-scanners-config-release.sh ${RELEASE_TAG}
34+
35+
- name: Check if generated sec-scanners-config differs and commit
36+
run: |
37+
if [ -z "$(git status --porcelain)" ]; then
38+
echo "No changes found"
39+
else
40+
echo "Changes found. Commiting to repo"
41+
echo "bumped sec-scanners-config.yaml to ${RELEASE_TAG}"
42+
git config --global user.email "[email protected]"
43+
git config --global user.name "Test Test"
44+
git add ./sec-scanners-config.yaml
45+
git commit -m "bumped sec-scanners-config.yaml to ${RELEASE_TAG}"
46+
git push
47+
fi

.github/workflows/create-release.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ on:
77
default: ""
88
required: true
99

10-
1110
jobs:
12-
1311
create-draft:
1412
name: Create draft
1513
runs-on: ubuntu-latest
@@ -23,26 +21,26 @@ jobs:
2321
uses: actions/checkout@v4
2422
with:
2523
fetch-depth: 0
26-
24+
2725
- name: Create changelog
28-
run: ./.github/workflows/scripts/create_changelog.sh $REPOSITORY $RELEASE_TAG
26+
run: ./tools/scripts/release/create_changelog.sh $REPOSITORY $RELEASE_TAG
2927

3028
- name: Create draft release
3129
id: create-draft
3230
run: |
33-
RELEASE_ID=$(./.github/workflows/scripts/create_draft_release.sh $REPOSITORY $RELEASE_TAG)
31+
RELEASE_ID=$(./tools/scripts/release/create_draft_release.sh $REPOSITORY $RELEASE_TAG)
3432
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
3533
3634
- name: Get manifest and example
3735
run: |
3836
MANIFEST_FILEPATH=./config/crd/bases/cloud-resources.kyma-project.io_cloudresources.yaml
3937
EXAMPLE_FILEPATH=./config/samples/cloud-resources_v1beta1_cloudresources.yaml
40-
./.github/workflows/scripts/upload_manifests.sh $REPOSITORY $MANIFEST_FILEPATH $EXAMPLE_FILEPATH ${{steps.create-draft.outputs.release_id}}
41-
38+
./tools/scripts/upload_manifests.sh $REPOSITORY $MANIFEST_FILEPATH $EXAMPLE_FILEPATH ${{steps.create-draft.outputs.release_id}}
39+
4240
- name: Add lightweight tag
4341
run: |
4442
git tag $RELEASE_TAG
4543
git push origin $RELEASE_TAG
46-
44+
4745
outputs:
4846
release_id: ${{steps.create-draft.outputs.release_id}}

0 commit comments

Comments
 (0)