@@ -17,36 +17,27 @@ jobs:
1717 java-version : ' 11'
1818 - name : Setup Gradle
1919 uses : gradle/gradle-build-action@v2
20+ - name : Get tag name
21+ id : tag
22+ run : |
23+ tag=$(basename "${{ github.ref }}")
24+ echo "tag=$tag" >> $GITHUB_OUTPUT
2025 - name : Build distribution
2126 run : ./gradlew :server:distZip :grammars:distZip
2227 - name : Create release
23- uses : actions/create-release@v1
24- id : create_release
2528 env :
26- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27- with :
28- tag_name : ${{ github.ref }}
29- release_name : Version ${{ github.ref }}
30- draft : false
31- prerelease : false
32- - name : Upload server asset
33- uses : actions/upload-release-asset@v1
29+ GH_TOKEN : ${{ github.token }}
30+ GH_REPO : ${{ github.repository }}
31+ run : |
32+ tag="${{ steps.tag.outputs.tag }}"
33+ gh release create "$tag" --title "Version $tag"
34+ - name : Upload assets
3435 env :
35- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36- with :
37- upload_url : ${{ steps.create_release.outputs.upload_url }}
38- asset_path : ./server/build/distributions/server.zip
39- asset_name : server.zip
40- asset_content_type : application/zip
41- - name : Upload grammar asset
42- uses : actions/upload-release-asset@v1
43- env :
44- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45- with :
46- upload_url : ${{ steps.create_release.outputs.upload_url }}
47- asset_path : ./grammars/build/distributions/grammars.zip
48- asset_name : grammars.zip
49- asset_content_type : application/zip
36+ GH_TOKEN : ${{ github.token }}
37+ GH_REPO : ${{ github.repository }}
38+ run : |
39+ tag="${{ steps.tag.outputs.tag }}"
40+ gh release upload "$tag" {server,grammars}/build/distributions/*
5041 - name : Deploy Docker image to GitHub Packages
5142 uses : docker/build-push-action@v1
5243 with :
0 commit comments