Skip to content

Commit bdf9a1b

Browse files
committed
ci: create release workflow
1 parent 4c0ed05 commit bdf9a1b

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

.github/workflows/release.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "stable-*"
7+
- "beta-*"
8+
- "alpha-*"
9+
- "index-*"
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-24.04
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Code checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Create release branch and bump version
22+
env:
23+
REF_NAME: ${{ github.ref_name }}
24+
run: |
25+
BRANCH=release/"${REF_NAME}"
26+
git config --local user.email '[email protected]'
27+
git config --local user.name 'Blueprint CI'
28+
git checkout -b "$BRANCH"
29+
git push -u origin "$BRANCH"
30+
sed -i "s/VERSION=\"rolling\" #;/VERSION=\"${REF_NAME}\" #;/" blueprint.sh
31+
git add blueprint.sh
32+
git commit -m 'ci(release): bump version'
33+
git push
34+
35+
- name: Create release archive
36+
env:
37+
REF_NAME: ${{ github.ref_name }}
38+
run: |
39+
zip -r "${REF_NAME}.zip" * .eslintrc.js .prettierignore .prettierrc.json .shellcheckrc
40+
41+
- name: Create changelog
42+
env:
43+
REF_NAME: ${{ github.ref_name }}
44+
run: |
45+
echo "[**Changelog**](https://blueprint.zip/releases/${REF_NAME})" > ./RELEASE_CHANGELOG
46+
47+
- name: Create checksum and add to changelog
48+
env:
49+
REF_NAME: ${{ github.ref_name }}
50+
run: |
51+
SUM=`sha256sum "${REF_NAME}.zip"`
52+
echo -e "\n#### SHA256 Checksum\n\n\`\`\`\n$SUM\n\`\`\`\n" >> ./RELEASE_CHANGELOG
53+
echo "$SUM" > checksum.txt
54+
55+
- name: Create release
56+
id: create_release
57+
uses: softprops/action-gh-release@v2
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
draft: true
62+
prerelease: ${{ contains(github.ref, 'rc') }}
63+
body_path: ./RELEASE_CHANGELOG
64+
files: |
65+
${{ github.ref_name }}.zip
66+
checksum.txt

blueprint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
BLUEPRINT_ENGINE="solstice"
1212
REPOSITORY="BlueprintFramework/framework"
13-
VERSION="beta-2025-12"
13+
VERSION="rolling" #;
1414

1515
FOLDER=$(realpath "$(dirname "$0" 2> /dev/null)" 2> /dev/null) || FOLDER="$BLUEPRINT__FOLDER"
1616
OWNERSHIP="www-data:www-data" #;

0 commit comments

Comments
 (0)