Skip to content

Commit a6350c8

Browse files
authored
Merge pull request #35 from webrtc-sdk/blaze/create-release
Rewrite deprecated release action
2 parents c6a5102 + 970b639 commit a6350c8

File tree

1 file changed

+7
-180
lines changed

1 file changed

+7
-180
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -25,40 +25,6 @@ permissions:
2525
actions: read
2626

2727
jobs:
28-
# build-windows:
29-
# defaults:
30-
# run:
31-
# working-directory: .\\build
32-
# strategy:
33-
# fail-fast: false
34-
# matrix:
35-
# name:
36-
# - windows_x86_64
37-
# - windows_arm64
38-
# runs-on: windows-2019
39-
# steps:
40-
# - uses: actions/checkout@v4
41-
# - name: Disk Cleanup
42-
# run: |
43-
# Get-PSDrive
44-
# # Cache 済み Docker Image の削除
45-
# # Clean unused docker images
46-
# docker rmi $(docker images -q -a)
47-
# # Android SDK の削除
48-
# # Delete Android SDK
49-
# Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
50-
# Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
51-
# # JVM の削除
52-
# # Delete JVM
53-
# Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
54-
# Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
55-
# Get-PSDrive
56-
# - run: "& .\\build.${{ matrix.name }}.ps1 \"${{ github.event.inputs.commitHash }}\""
57-
# - name: Upload Artifact
58-
# uses: actions/upload-artifact@v4
59-
# with:
60-
# name: webrtc.${{ matrix.name }}.zip
61-
# path: build\_package\${{ matrix.name }}\webrtc.zip
6228
build-apple:
6329
defaults:
6430
run:
@@ -81,7 +47,7 @@ jobs:
8147
- name: Upload Artifact
8248
uses: actions/upload-artifact@v4
8349
with:
84-
name: ${{ steps.build.outputs.framework_name }}.xcframework
50+
name: ${{ steps.build.outputs.framework_name }}.xcframework.zip
8551
path: build/_package/${{ matrix.name }}/${{ steps.build.outputs.framework_name }}.xcframework.zip
8652
build-linux:
8753
defaults:
@@ -91,14 +57,6 @@ jobs:
9157
fail-fast: false
9258
matrix:
9359
name:
94-
# - raspberry-pi-os_armv6
95-
# - raspberry-pi-os_armv7
96-
# - raspberry-pi-os_armv8
97-
# - ubuntu-18.04_armv8
98-
# - ubuntu-20.04_armv8
99-
# - ubuntu-18.04_x86_64
100-
# - ubuntu-20.04_x86_64
101-
# - ubuntu-22.04_x86_64
10260
- android
10361
- android_prefixed
10462
runs-on: buildjet-4vcpu-ubuntu-2204
@@ -122,151 +80,20 @@ jobs:
12280
path: build/_package/${{ matrix.name }}/webrtc.tar.gz
12381
create-release:
12482
name: Create Release
125-
if: contains(github.ref, 'tags/m')
83+
if: github.ref_type == 'tag'
12684
needs:
127-
# - build-windows
12885
- build-apple
12986
- build-linux
13087
runs-on: ubuntu-latest
13188
steps:
13289
- uses: actions/checkout@v4
133-
- name: Create Release
134-
id: create_release
135-
uses: elgohr/Github-Release-Action@v5
136-
env:
137-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138-
with:
139-
tag: ${{ github.ref }}
140-
title: Release ${{ github.ref }}
141-
- name: Output upload url
142-
shell: bash
143-
run: echo "UPLOAD_URL='${{ steps.create_release.outputs.upload_url }}'" > create-release.env
144-
- name: Upload create-release Environment
145-
uses: actions/upload-artifact@v4
146-
with:
147-
name: create-release.env
148-
path: create-release.env
149-
upload-assets:
150-
strategy:
151-
fail-fast: false
152-
matrix:
153-
name:
154-
# - macos_arm64
155-
# - macos_x86_64
156-
# - ios
157-
# - raspberry-pi-os_armv6
158-
# - raspberry-pi-os_armv7
159-
# - raspberry-pi-os_armv8
160-
# - ubuntu-18.04_armv8
161-
# - ubuntu-20.04_armv8
162-
# - ubuntu-18.04_x86_64
163-
# - ubuntu-20.04_x86_64
164-
# - ubuntu-22.04_x86_64
165-
- android
166-
- android_prefixed
167-
name: Release ${{ matrix.name }}
168-
if: contains(github.ref, 'tags/m')
169-
needs:
170-
- create-release
171-
runs-on: ubuntu-latest
172-
steps:
173-
- name: Checkout code
174-
uses: actions/checkout@v4
175-
- name: Download ${{ matrix.name }}
176-
uses: actions/download-artifact@v4
177-
with:
178-
name: webrtc.${{ matrix.name }}.tar.gz
17990
- uses: actions/download-artifact@v4
18091
with:
181-
name: create-release.env
182-
- name: Env to output
183-
shell: bash
184-
run: |
185-
ls -R
186-
source create-release.env
187-
echo "upload_url=$UPLOAD_URL" >> "$GITHUB_OUTPUT"
188-
id: env
189-
- name: Upload ${{ matrix.name }} Release Asset
190-
uses: actions/[email protected]
191-
env:
192-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
193-
with:
194-
upload_url: ${{ steps.env.outputs.upload_url }}
195-
asset_path: webrtc.${{ matrix.name }}.tar.gz/webrtc.tar.gz
196-
asset_name: webrtc.${{ matrix.name }}.tar.gz
197-
asset_content_type: application/gzip
198-
upload-assets-apple:
199-
strategy:
200-
fail-fast: false
201-
matrix:
202-
name:
203-
- WebRTC.xcframework
204-
- LiveKitWebRTC.xcframework
205-
name: Release ${{ matrix.name }}
206-
if: contains(github.ref, 'tags/m')
207-
needs:
208-
- create-release
209-
runs-on: ubuntu-latest
210-
steps:
211-
- name: Download ${{ matrix.name }}
212-
uses: actions/download-artifact@v4
213-
with:
214-
name: ${{ matrix.name }}
215-
- uses: actions/download-artifact@v4
216-
with:
217-
name: create-release.env
218-
- name: Env to output
219-
shell: bash
220-
run: |
221-
ls -R
222-
source create-release.env
223-
echo "upload_url=$UPLOAD_URL" >> "$GITHUB_OUTPUT"
224-
id: env
225-
- name: Upload ${{ matrix.name }} Release Asset
226-
uses: actions/[email protected]
92+
path: artifacts
93+
- uses: softprops/action-gh-release@v2
22794
env:
22895
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22996
with:
230-
upload_url: ${{ steps.env.outputs.upload_url }}
231-
asset_path: ${{ matrix.name }}.zip
232-
asset_name: ${{ matrix.name }}
233-
asset_content_type: application/zip
234-
# Windows だけ Content-Type が違うので別で記述する
235-
# Windows has a different Content-Type, so handle it separately.
236-
# upload-assets-windows:
237-
# strategy:
238-
# fail-fast: false
239-
# matrix:
240-
# name:
241-
# - windows_x86_64
242-
# - windows_arm64
243-
# name: Upload windows
244-
# if: contains(github.ref, 'tags/m')
245-
# needs:
246-
# - create-release
247-
# runs-on: ubuntu-latest
248-
# steps:
249-
# - name: Checkout code
250-
# uses: actions/checkout@v4
251-
# - name: Download ${{ matrix.name }}
252-
# uses: actions/download-artifact@v4
253-
# with:
254-
# name: webrtc.${{ matrix.name }}.zip
255-
# - uses: actions/download-artifact@v4
256-
# with:
257-
# name: create-release.env
258-
# - name: Env to output
259-
# shell: bash
260-
# run: |
261-
# source create-release.env/create-release.env
262-
# echo "upload_url=$UPLOAD_URL" >> "$GITHUB_OUTPUT"
263-
# id: env
264-
# - name: Upload windows Release Asset
265-
# uses: actions/[email protected]
266-
# env:
267-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
268-
# with:
269-
# upload_url: ${{ steps.env.outputs.upload_url }}
270-
# asset_path: webrtc.${{ matrix.name }}.zip/webrtc.zip
271-
# asset_name: webrtc.${{ matrix.name }}.zip
272-
# asset_content_type: application/zip
97+
files: |
98+
artifacts/**/*.xcframework.zip
99+
artifacts/**/*.tar.gz

0 commit comments

Comments
 (0)