Skip to content

Commit cfd9978

Browse files
authored
Merge pull request #62 from KelvinTegelaar/master
[pull] master from KelvinTegelaar:master
2 parents 23910f6 + 3bca2ce commit cfd9978

File tree

237 files changed

+4327
-1911
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+4327
-1911
lines changed

Diff for: .github/workflows/dev_cipp4i6t3.yml

-30
This file was deleted.

Diff for: .github/workflows/dev_cippkkxvm.yml

-30
This file was deleted.

Diff for: .github/workflows/dev_cippkwn4s-auditlog.yml

-30
This file was deleted.

Diff for: .github/workflows/dev_cippkwn4s.yml

-39
This file was deleted.

Diff for: .github/workflows/dev_cipplwwww-proc.yml

-30
This file was deleted.

Diff for: .github/workflows/dev_cipplwwww.yml

-30
This file was deleted.

Diff for: .github/workflows/publish_prerelease.yml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Generate Release Notes and Upload
2+
3+
on:
4+
push:
5+
branches:
6+
- pre-release
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
if: github.event.repository.fork == false && github.event_name == 'push'
14+
name: Generate Release Notes and Upload to Azure
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
# Checkout the repository
19+
- name: Checkout Code
20+
uses: actions/checkout@v3
21+
22+
# Read and Trim Version
23+
- name: Read and Trim Version
24+
id: get_version
25+
run: |
26+
if [ ! -f version_latest.txt ]; then
27+
echo "Error: version_latest.txt not found!"
28+
exit 1
29+
fi
30+
VERSION=$(cat version_latest.txt | tr -d '[:space:]')
31+
if [ -z "$VERSION" ]; then
32+
echo "Error: version_latest.txt is empty after trimming!"
33+
exit 1
34+
fi
35+
echo "version=$VERSION" >> $GITHUB_OUTPUT
36+
37+
# Exit if Tag Already Exists
38+
- name: Check if Tag Exists
39+
id: tag_check
40+
run: |
41+
git fetch --tags
42+
if git rev-parse "refs/tags/${{ steps.get_version.outputs.version }}" >/dev/null 2>&1; then
43+
echo "tag_exists=true" >> $GITHUB_ENV
44+
echo "Tag ${{ steps.get_version.outputs.version }} already exists. Exiting workflow successfully."
45+
else
46+
echo "tag_exists=false" >> $GITHUB_ENV
47+
fi
48+
49+
# Generate Release Notes
50+
- name: Generate Release Notes
51+
id: changelog
52+
if: env.tag_exists == 'false'
53+
uses: mikepenz/[email protected]
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
57+
# Create a new release tag
58+
- name: Create GitHub Release
59+
if: env.tag_exists == 'false'
60+
uses: ncipollo/[email protected]
61+
with:
62+
tag: ${{ steps.get_version.outputs.version }}
63+
name: "v${{ steps.get_version.outputs.version }}"
64+
draft: false
65+
prerelease: true
66+
body: ${{ steps.changelog.outputs.changelog }}
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
70+
# Create ZIP File in a New Source Directory
71+
- name: Prepare and Zip Release Files
72+
if: env.tag_exists == 'false'
73+
run: |
74+
mkdir -p src/releases
75+
zip -r src/releases/release_${{ steps.get_version.outputs.version }}.zip . \
76+
--exclude "./src/releases/*" \
77+
--exclude ".*" \
78+
--exclude ".*/**"
79+
zip -r src/releases/beta.zip . \
80+
--exclude "./src/releases/*" \
81+
--exclude ".*" \
82+
--exclude ".*/**"
83+
84+
# Upload to Azure Blob Storage
85+
- name: Azure Blob Upload with Destination folder defined
86+
if: env.tag_exists == 'false'
87+
uses: LanceMcCarthy/[email protected]
88+
with:
89+
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
90+
container_name: cipp-api
91+
source_folder: src/releases/
92+
destination_folder: /
93+
delete_if_exists: true

Diff for: .github/workflows/publish_release.yml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Generate Release Notes and Upload Production to Azure
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
if: github.event.repository.fork == false && github.event_name == 'push'
14+
name: Generate Release Notes and Upload to Azure
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
# Checkout the repository
19+
- name: Checkout Code
20+
uses: actions/checkout@v3
21+
22+
# Read and Trim Version
23+
- name: Read and Trim Version
24+
id: get_version
25+
run: |
26+
if [ ! -f version_latest.txt ]; then
27+
echo "Error: version_latest.txt not found!"
28+
exit 1
29+
fi
30+
VERSION=$(cat version_latest.txt | tr -d '[:space:]')
31+
if [ -z "$VERSION" ]; then
32+
echo "Error: version_latest.txt is empty after trimming!"
33+
exit 1
34+
fi
35+
echo "version=$VERSION" >> $GITHUB_OUTPUT
36+
37+
# Exit if Tag Already Exists
38+
- name: Check if Tag Exists
39+
id: tag_check
40+
run: |
41+
git fetch --tags
42+
if git rev-parse "refs/tags/${{ steps.get_version.outputs.version }}" >/dev/null 2>&1; then
43+
echo "tag_exists=true" >> $GITHUB_ENV
44+
echo "Tag ${{ steps.get_version.outputs.version }} already exists. Exiting workflow successfully."
45+
else
46+
echo "tag_exists=false" >> $GITHUB_ENV
47+
fi
48+
49+
# Generate Release Notes
50+
- name: Generate Release Notes
51+
id: changelog
52+
if: env.tag_exists == 'false'
53+
uses: mikepenz/[email protected]
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
57+
# Create a new release tag
58+
- name: Create GitHub Release
59+
if: env.tag_exists == 'false'
60+
uses: ncipollo/[email protected]
61+
with:
62+
tag: ${{ steps.get_version.outputs.version }}
63+
name: "v${{ steps.get_version.outputs.version }}"
64+
draft: false
65+
prerelease: false
66+
makeLatest: true
67+
body: ${{ steps.changelog.outputs.changelog }}
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
71+
# Create ZIP File in a New Source Directory
72+
- name: Prepare and Zip Release Files
73+
if: env.tag_exists == 'false'
74+
run: |
75+
mkdir -p src/releases
76+
zip -r src/releases/release_${{ steps.get_version.outputs.version }}.zip . \
77+
--exclude "./src/releases/*" \
78+
--exclude ".*" \
79+
--exclude ".*/**"
80+
zip -r src/releases/latest.zip . \
81+
--exclude "./src/releases/*" \
82+
--exclude ".*" \
83+
--exclude ".*/**"
84+
85+
# Upload to Azure Blob Storage
86+
- name: Azure Blob Upload with Destination folder defined
87+
if: env.tag_exists == 'false'
88+
uses: LanceMcCarthy/[email protected]
89+
with:
90+
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
91+
container_name: cipp-api
92+
source_folder: src/releases/
93+
destination_folder: /
94+
delete_if_exists: true

0 commit comments

Comments
 (0)