Skip to content

Commit 30674e3

Browse files
committed
fix release scripts
1 parent 7ebbb6f commit 30674e3

File tree

2 files changed

+14
-54
lines changed

2 files changed

+14
-54
lines changed

.github/workflows/release-linux.yml

+6-28
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,11 @@ jobs:
3939
tar -czf ${SLANG_BINARY_ARCHIVE_TAR} bin/*/*/slangc bin/*/*/libslang.so bin/*/*/libslang-glslang.so docs/*.md README.md LICENSE slang.h slang-com-helper.h slang-com-ptr.h slang-tag-version.h prelude/*.h
4040
echo "::set-output name=SLANG_BINARY_ARCHIVE::${SLANG_BINARY_ARCHIVE}"
4141
echo "::set-output name=SLANG_BINARY_ARCHIVE_TAR::${SLANG_BINARY_ARCHIVE_TAR}"
42-
- name: Create Release
43-
id: create_release
44-
uses: actions/create-release@v1
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
with:
48-
tag_name: ${{ github.ref }}
49-
release_name: Release ${{ github.ref }}
50-
draft: false
51-
prerelease: false
52-
- name: Upload Release Asset (zip)
53-
id: upload-release-asset-zip
54-
uses: actions/upload-release-asset@v1
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
- name: UploadBinary
43+
uses: softprops/action-gh-release@v1
5744
with:
58-
upload_url: ${{ steps.create_release.outputs.upload_url }}
59-
asset_path: ./${{ steps.build.outputs.SLANG_BINARY_ARCHIVE }}
60-
asset_name: ${{ steps.build.outputs.SLANG_BINARY_ARCHIVE }}
61-
asset_content_type: application/zip
62-
- name: Upload Release Asset (tar)
63-
id: upload-release-asset-tar
64-
uses: actions/upload-release-asset@v1
45+
files: |
46+
${{ steps.build.outputs.SLANG_BINARY_ARCHIVE }}
47+
${{ steps.build.outputs.SLANG_BINARY_ARCHIVE_TAR }}
6548
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
with:
68-
upload_url: ${{ steps.create_release.outputs.upload_url }}
69-
asset_path: ./${{ steps.build.outputs.SLANG_BINARY_ARCHIVE_TAR }}
70-
asset_name: ${{ steps.build.outputs.SLANG_BINARY_ARCHIVE_TAR }}
71-
asset_content_type: application/zip
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-windows.yml

+8-26
Original file line numberDiff line numberDiff line change
@@ -64,34 +64,16 @@ jobs:
6464
7z a "$srcArchive" docs\*.md
6565
7z a "$srcArchive" README.md
6666
7z a "$srcArchive" LICENSE
67-
- name: Create Release
68-
id: create_release
69-
uses: actions/create-release@v1
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
- name: UploadBinary
68+
uses: softprops/action-gh-release@v1
7269
with:
73-
tag_name: ${{ github.ref }}
74-
release_name: Release ${{ github.ref }}
75-
draft: false
76-
prerelease: false
77-
- name: Upload Release Asset (zip)
78-
id: upload-release-asset-zip
79-
uses: actions/upload-release-asset@v1
70+
files: ${{ steps.build.outputs.SLANG_BINARY_ARCHIVE }}
8071
env:
8172
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
- name: UploadSource
74+
uses: softprops/action-gh-release@v1
75+
if: ${{ matrix.platform == "x64" }}
8276
with:
83-
upload_url: ${{ steps.create_release.outputs.upload_url }}
84-
asset_path: ./${{ steps.build.outputs.SLANG_BINARY_ARCHIVE }}
85-
asset_name: ${{ steps.build.outputs.SLANG_BINARY_ARCHIVE }}
86-
asset_content_type: application/zip
87-
- name: Upload Release Source (zip)
88-
id: upload-release-src-zip
89-
uses: actions/upload-release-asset@v1
90-
if: ${{ matrix.platform == 'x64' }}
77+
files: ${{ steps.build.outputs.SLANG_SOURCE_ARCHIVE }}
9178
env:
92-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93-
with:
94-
upload_url: ${{ steps.create_release.outputs.upload_url }}
95-
asset_path: ./${{ steps.build.outputs.SLANG_SOURCE_ARCHIVE }}
96-
asset_name: ${{ steps.build.outputs.SLANG_SOURCE_ARCHIVE }}
97-
asset_content_type: application/zip
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)