Skip to content

Commit f95d42c

Browse files
authored
Create GitHub releases on successful build of main (#11)
1 parent eae83fd commit f95d42c

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/redpoint.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ jobs:
5353
- name: "Prepare for Upload"
5454
run: |
5555
mv /opt/llvm-redpoint llvm-linux-${{ needs.get-branch-name.outputs.branch }}
56+
zip -r llvm-linux-${{ needs.get-branch-name.outputs.branch }}.zip llvm-linux-${{ needs.get-branch-name.outputs.branch }}
5657
- name: "Upload LLVM"
5758
uses: actions/upload-artifact@v4
5859
with:
5960
name: llvm-linux-${{ needs.get-branch-name.outputs.branch }}
6061
if-no-files-found: error
6162
path: |
62-
llvm-linux-${{ needs.get-branch-name.outputs.branch }}
63+
llvm-linux-${{ needs.get-branch-name.outputs.branch }}.zip
6364
6465
llvm-redpoint-windows:
6566
name: "Build for Windows"
@@ -113,17 +114,37 @@ jobs:
113114
shell: pwsh
114115
run: |
115116
Move-Item -Force "C:\Program Files\LLVM" llvm-win64-${{ needs.get-branch-name.outputs.branch }}
117+
Compress-Archive -Force -Path "llvm-win64-${{ needs.get-branch-name.outputs.branch }}" -DestinationPath "llvm-win64-${{ needs.get-branch-name.outputs.branch }}.zip"
116118
- name: "Upload LLVM ZIP"
117119
uses: actions/upload-artifact@v4
118120
with:
119121
name: llvm-win64-${{ needs.get-branch-name.outputs.branch }}
120122
if-no-files-found: error
121123
path: |
122-
llvm-win64-${{ needs.get-branch-name.outputs.branch }}
124+
llvm-win64-${{ needs.get-branch-name.outputs.branch }}.zip
123125
- name: "Upload LLVM MSI"
124126
uses: actions/upload-artifact@v4
125127
with:
126128
name: llvm-win64-msi-${{ needs.get-branch-name.outputs.branch }}
127129
if-no-files-found: error
128130
path: |
129-
.github/workflows/llvm.msi
131+
.github/workflows/llvm.msi
132+
133+
create-release:
134+
name: "Create Release"
135+
needs:
136+
- llvm-redpoint-linux
137+
- llvm-redpoint-windows
138+
runs-on: ubuntu-latest
139+
if: github.ref == 'refs/heads/main'
140+
steps:
141+
- name: Publish Release
142+
uses: ncipollo/release-action@v1
143+
with:
144+
artifacts: "llvm-linux-${{ needs.get-branch-name.outputs.branch }},llvm-win64-${{ needs.get-branch-name.outputs.branch }}"
145+
artifactErrorsFailBuild: true
146+
artifactContentType: "application/zip"
147+
tag: "${{ needs.get-branch-name.outputs.branch }}-${{ env.GITHUB_SHA }}"
148+
commit: ${{ env.GITHUB_SHA }}
149+
body: This release for Clang ${{ needs.get-branch-name.outputs.branch }} was automatically created from a successful build.
150+
generateReleaseNotes: true

0 commit comments

Comments
 (0)