Skip to content

Commit fc9f536

Browse files
authored
chore: Update create a release (#2)
1 parent 2b634d6 commit fc9f536

1 file changed

Lines changed: 32 additions & 11 deletions

File tree

.github/workflows/scala.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0 # Fetch all history for tags
2426

2527
- name: Set up JDK
2628
uses: actions/setup-java@v4
@@ -35,27 +37,46 @@ jobs:
3537
- name: Run tests
3638
run: sbt test
3739

38-
- name: Build package
39-
run: sbt Universal/packageBin
40+
- name: Build universal package
41+
run: sbt 'set version := "${{ github.ref_name }}"' Universal/packageBin
4042

41-
- name: Upload artifact
42-
uses: actions/upload-artifact@v4
43-
with:
44-
name: supercoder-package
45-
path: target/universal/supercoder-*.zip
46-
retention-days: 5
43+
- name: Get package path
44+
id: get_package
45+
run: |
46+
echo "PACKAGE_PATH=$(find target/universal -name 'supercoder-*.zip' -type f)" >> $GITHUB_ENV
47+
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
4748
4849
- name: Create a Release
4950
if: startsWith(github.ref, 'refs/tags/')
5051
uses: softprops/action-gh-release@v1
5152
with:
52-
files: target/universal/supercoder-*.zip
53-
name: Release ${{ github.ref_name }}
53+
files: ${{ env.PACKAGE_PATH }}
54+
name: Release ${{ env.VERSION }}
55+
body: |
56+
## SuperCoder Release ${{ env.VERSION }}
57+
58+
### Installation
59+
Download the zip file and extract it to your desired location.
60+
61+
### Running
62+
After extraction, you can run the application using:
63+
```bash
64+
./bin/supercoder
65+
```
66+
67+
### Changes
68+
See the commit history for detailed changes.
5469
draft: false
5570
prerelease: false
56-
generate_release_notes: true
5771
token: ${{ secrets.GITHUB_TOKEN }}
5872

73+
- name: Upload artifact
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: supercoder-package
77+
path: ${{ env.PACKAGE_PATH }}
78+
retention-days: 5
79+
5980
- name: Cleanup before cache
6081
run: |
6182
rm -rf "$HOME/.ivy2/local" || true

0 commit comments

Comments
 (0)