2121
2222 steps :
2323 - name : Checkout code
24- uses : actions/checkout@v3
24+ uses : actions/checkout@v4
2525
2626 - name : Update all submodules
2727 run : |
@@ -72,55 +72,49 @@ jobs:
7272
7373 - name : Upload build artifact (Windows)
7474 if : matrix.os == 'windows-latest'
75- uses : actions/upload-artifact@v3
75+ uses : actions/upload-artifact@v4
7676 with :
7777 name : ${{ matrix.artifact-name }}
7878 path : ${{github.workspace}}/build/RAYX-*-win64.zip
79-
79+ if-no-files-found : error
80+
8081 - name : Upload build artifact (Ubuntu)
8182 if : matrix.os == 'ubuntu-latest'
82- uses : actions/upload-artifact@v3
83+ uses : actions/upload-artifact@v4
8384 with :
8485 name : ${{ matrix.artifact-name }}
8586 path : ${{github.workspace}}/build/RAYX-*-Linux.deb
87+ if-no-files-found : error
8688
87- create-release :
89+ release :
90+ name : Create Release
8891 needs : build-and-release
8992 runs-on : ubuntu-latest
9093 steps :
94+ # Checkout CHANGELOG.md
95+ - name : Checkout code
96+ uses : actions/checkout@v4
97+ with :
98+ sparse-checkout : CHANGELOG.md
99+
91100 - name : Download Artifacts
92- uses : actions/download-artifact@v3
101+ uses : actions/download-artifact@v4
93102 with :
94103 path : ${{github.workspace}}/artifacts
95104
96- - name : Create Release
97- id : create_release
98- uses : actions/create-release@v1
99- env :
100- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
105+ - name : Extract version from tag
106+ id : get_version
107+ run : echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
108+
109+ - name : Create and Upload Release
110+ uses : softprops/action-gh-release@v1
111+ if : startsWith(github.ref, 'refs/tags/')
101112 with :
102- tag_name : ${{ github.ref_name }}
103- release_name : Release ${{ github.ref_name }}
104- body : This will be updated soon...
105- draft : false
106- prerelease : false
107-
108- - name : Upload Artifact to Release (Windows)
109- uses : actions/upload-release-asset@v1
113+ body_path : ${{github.workspace}}/CHANGELOG.md
114+ files : |
115+ ${{github.workspace}}/artifacts/rayx-win64.zip/*.zip
116+ ${{github.workspace}}/artifacts/rayx-Linux.deb/*.deb
110117 env :
111118 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
112- with :
113- upload_url : ${{ steps.create_release.outputs.upload_url }}
114- asset_path : ${{github.workspace}}/artifacts/rayx-win64.zip/rayx-win64.zip
115- asset_name : rayx-win64.zip
116- asset_content_type : application/zip
117119
118- - name : Upload Artifact to Release (Ubuntu)
119- uses : actions/upload-release-asset@v1
120- env :
121- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
122- with :
123- upload_url : ${{ steps.create_release.outputs.upload_url }}
124- asset_path : ${{github.workspace}}/artifacts/rayx-Linux.deb/rayx-Linux.deb
125- asset_name : rayx-Linux.deb
126- asset_content_type : application/x-deb
120+
0 commit comments