Skip to content

Commit 20d5c51

Browse files
committed
Update build and release workflows
1 parent 5d27f79 commit 20d5c51

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

.github/workflows/buildService.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: Start9Labs/sdk@v1
1818

1919
- name: Checkout services repository
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Build the service package
2323
id: build
@@ -26,12 +26,11 @@ jobs:
2626
start-sdk init
2727
make
2828
PACKAGE_ID=$(yq -oy ".id" manifest.*)
29-
echo "::set-output name=package_id::$PACKAGE_ID"
29+
echo "package_id=$PACKAGE_ID" >> $GITHUB_ENV
3030
shell: bash
3131

3232
- name: Upload .s9pk
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
with:
35-
name: ${{ steps.build.outputs.package_id }}.s9pk
36-
path: ./${{ steps.build.outputs.package_id }}.s9pk
37-
35+
name: ${{ env.package_id }}.s9pk
36+
path: ./${{ env.package_id }}.s9pk

.github/workflows/releaseService.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: Start9Labs/sdk@v1
1616

1717
- name: Checkout services repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Build the service package
2121
run: |
@@ -26,19 +26,18 @@ jobs:
2626
- name: Setting package ID and title from the manifest
2727
id: package
2828
run: |
29-
echo "::set-output name=package_id::$(yq -oy ".id" manifest.*)"
30-
echo "::set-output name=package_title::$(yq -oy ".title" manifest.*)"
29+
echo "package_id=$(yq -oy ".id" manifest.*)" >> $GITHUB_ENV
30+
echo "package_title=$(yq -oy ".title" manifest.*)" >> $GITHUB_ENV
3131
shell: bash
3232

3333
- name: Generate sha256 checksum
3434
run: |
35-
PACKAGE_ID=${{ steps.package.outputs.package_id }}
36-
sha256sum ${PACKAGE_ID}.s9pk > ${PACKAGE_ID}.s9pk.sha256
35+
PACKAGE_ID=${{ env.package_id }}
3736
shell: bash
3837

3938
- name: Generate changelog
4039
run: |
41-
PACKAGE_ID=${{ steps.package.outputs.package_id }}
40+
PACKAGE_ID=${{ env.package_id }}
4241
echo "## What's Changed" > change-log.txt
4342
yq -oy '.release-notes' manifest.* >> change-log.txt
4443
echo "## SHA256 Hash" >> change-log.txt
@@ -48,15 +47,12 @@ jobs:
4847
shell: bash
4948

5049
- name: Create GitHub Release
51-
uses: softprops/action-gh-release@v1
50+
uses: softprops/action-gh-release@v2
5251
with:
5352
tag_name: ${{ github.ref_name }}
54-
name: ${{ steps.package.outputs.package_title }} ${{ github.ref_name }}
53+
name: ${{ env.package_title }} ${{ github.ref_name }}
5554
prerelease: true
5655
body_path: change-log.txt
57-
files: |
58-
./${{ steps.package.outputs.package_id }}.s9pk
59-
./${{ steps.package.outputs.package_id }}.s9pk.sha256
6056

6157
- name: Publish to Registry
6258
env:
@@ -67,5 +63,5 @@ jobs:
6763
if [[ -z "$S9USER" || -z "$S9PASS" || -z "$S9REGISTRY" ]]; then
6864
echo "Publish skipped: missing registry credentials."
6965
else
70-
start-sdk publish https://$S9USER:$S9PASS@$S9REGISTRY ${{ steps.package.outputs.package_id }}.s9pk
66+
start-sdk publish https://$S9USER:$S9PASS@$S9REGISTRY ${{ env.package_id }}.s9pk
7167
fi

0 commit comments

Comments
 (0)