Skip to content

Commit b16df12

Browse files
committed
initial version
0 parents  commit b16df12

37 files changed

+5528
-0
lines changed

.github/workflows/buildService.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Service
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths-ignore: ['*.md']
7+
branches: ['main', 'master', 'update/040']
8+
push:
9+
paths-ignore: ['*.md']
10+
branches: ['main', 'master', 'update/040']
11+
12+
jobs:
13+
BuildPackage:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Prepare StartOS SDK
17+
uses: start9Labs/sdk@v2
18+
19+
- name: Checkout services repository
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
- name: Build the service package
25+
id: build
26+
run: |
27+
start-cli init
28+
RUST_LOG=debug RUST_BACKTRACE=1 make
29+
PACKAGE_ID=$(start-cli s9pk inspect *.s9pk manifest | jq -r '.id')
30+
echo "package_id=${PACKAGE_ID}" >> $GITHUB_ENV
31+
printf "\n SHA256SUM: $(sha256sum ${PACKAGE_ID}.s9pk) \n"
32+
shell: bash
33+
#
34+
# - name: Upload .s9pk
35+
# uses: actions/upload-artifact@v4
36+
# with:
37+
# name: ${{ env.package_id }}.s9pk
38+
# path: ./${{ env.package_id }}.s9pk
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Release Service
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*'
7+
8+
jobs:
9+
ReleasePackage:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Prepare StartOS SDK
15+
uses: start9Labs/sdk@v2
16+
17+
- name: Checkout services repository
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
21+
22+
- name: Build the service package
23+
run: |
24+
start-cli init
25+
RUST_LOG=debug RUST_BACKTRACE=1 make
26+
27+
- name: Setting package ID and title from the manifest
28+
id: package
29+
run: |
30+
PACKAGE_ID=$(start-cli s9pk inspect *.s9pk manifest | jq -r '.id')
31+
PACKAGE_TITLE=$(start-cli s9pk inspect *.s9pk manifest | jq -r '.title')
32+
echo "package_id=${PACKAGE_ID}" >> $GITHUB_ENV
33+
echo "package_title=${PACKAGE_TITLE}" >> $GITHUB_ENV
34+
printf "\n SHA256SUM: $(sha256sum ${PACKAGE_ID}.s9pk) \n"
35+
shell: bash
36+
37+
- name: Generate sha256 checksum
38+
run: |
39+
sha256sum ${PACKAGE_ID}.s9pk > ${PACKAGE_ID}.s9pk.sha256
40+
shell: bash
41+
42+
- name: Generate changelog
43+
run: |
44+
echo "## What's Changed" > change-log.txt
45+
echo "" >> change-log.txt
46+
47+
RELEASE_NOTES=$(start-cli s9pk inspect *.s9pk manifest | jq -r '.releaseNotes')
48+
echo "${RELEASE_NOTES}" >> change-log.txt
49+
50+
echo "## SHA256 Hash" >> change-log.txt
51+
echo '```' >> change-log.txt
52+
sha256sum ${{ env.package_id }}.s9pk >> change-log.txt
53+
echo '```' >> change-log.txt
54+
shell: bash
55+
56+
- name: Create GitHub Release
57+
uses: softprops/action-gh-release@v2
58+
with:
59+
tag_name: ${{ github.ref_name }}
60+
name: ${{ env.package_title }} ${{ github.ref_name }}
61+
prerelease: true
62+
body_path: change-log.txt
63+
files: |
64+
./${{ env.package_id }}.s9pk
65+
./${{ env.package_id }}.s9pk.sha256
66+
67+
- name: Publish to Registry
68+
env:
69+
S9USER: ${{ secrets.S9USER }}
70+
S9PASS: ${{ secrets.S9PASS }}
71+
S9REGISTRY: ${{ secrets.S9REGISTRY }}
72+
run: |
73+
if [[ -z "$S9USER" || -z "$S9PASS" || -z "$S9REGISTRY" ]]; then
74+
echo "Publish skipped: missing registry credentials."
75+
else
76+
start-sdk publish https://$S9USER:$S9PASS@$S9REGISTRY ${{ env.package_id }}.s9pk
77+
fi

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.s9pk
2+
.vscode/
3+
.DS_Store
4+
scripts/*.js
5+
docker-images
6+
node_modules
7+
javascript/*
8+
ncc-cache

LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2025 Remco Ros
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)