Preserve file permissions in GitHub Actions
The upload-artifact action does not preserve file permissions: <https://github.com/actions/upload-artifact?#permission-loss> Even if it is not critical for Windows releases, it will be for other platforms. Wrap everything in a tarball to keep original permissions. PR #5515 <https://github.com/Genymobile/scrcpy/pull/5515>
This commit is contained in:
parent
a57180047c
commit
7fc6943284
36
.github/workflows/release.yml
vendored
36
.github/workflows/release.yml
vendored
@ -87,11 +87,19 @@ jobs:
|
|||||||
- name: Build win32
|
- name: Build win32
|
||||||
run: release/build_windows.sh 32
|
run: release/build_windows.sh 32
|
||||||
|
|
||||||
|
# upload-artifact does not preserve permissions
|
||||||
|
- name: Tar
|
||||||
|
run: |
|
||||||
|
cd release/work/build-win32
|
||||||
|
mkdir dist-tar
|
||||||
|
cd dist-tar
|
||||||
|
tar -C .. -cvf dist.tar.gz dist/
|
||||||
|
|
||||||
- name: Upload build-win32 artifact
|
- name: Upload build-win32 artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-win32-intermediate
|
name: build-win32-intermediate
|
||||||
path: release/work/build-win32/dist/
|
path: release/work/build-win32/dist-tar/
|
||||||
|
|
||||||
build-win64:
|
build-win64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -113,11 +121,19 @@ jobs:
|
|||||||
- name: Build win64
|
- name: Build win64
|
||||||
run: release/build_windows.sh 64
|
run: release/build_windows.sh 64
|
||||||
|
|
||||||
|
# upload-artifact does not preserve permissions
|
||||||
|
- name: Tar
|
||||||
|
run: |
|
||||||
|
cd release/work/build-win64
|
||||||
|
mkdir dist-tar
|
||||||
|
cd dist-tar
|
||||||
|
tar -C .. -cvf dist.tar.gz dist/
|
||||||
|
|
||||||
- name: Upload build-win64 artifact
|
- name: Upload build-win64 artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-win64-intermediate
|
name: build-win64-intermediate
|
||||||
path: release/work/build-win64/dist/
|
path: release/work/build-win64/dist-tar/
|
||||||
|
|
||||||
package-win32:
|
package-win32:
|
||||||
needs:
|
needs:
|
||||||
@ -138,7 +154,13 @@ jobs:
|
|||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-win32-intermediate
|
name: build-win32-intermediate
|
||||||
path: release/work/build-win32/dist/
|
path: release/work/build-win32/dist-tar/
|
||||||
|
|
||||||
|
# upload-artifact does not preserve permissions
|
||||||
|
- name: Detar
|
||||||
|
run: |
|
||||||
|
cd release/work/build-win32
|
||||||
|
tar xf dist-tar/dist.tar.gz
|
||||||
|
|
||||||
- name: Package win32
|
- name: Package win32
|
||||||
run: release/package_client.sh win32
|
run: release/package_client.sh win32
|
||||||
@ -168,7 +190,13 @@ jobs:
|
|||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-win64-intermediate
|
name: build-win64-intermediate
|
||||||
path: release/work/build-win64/dist/
|
path: release/work/build-win64/dist-tar/
|
||||||
|
|
||||||
|
# upload-artifact does not preserve permissions
|
||||||
|
- name: Detar
|
||||||
|
run: |
|
||||||
|
cd release/work/build-win64
|
||||||
|
tar xf dist-tar/dist.tar.gz
|
||||||
|
|
||||||
- name: Package win64
|
- name: Package win64
|
||||||
run: release/package_client.sh win64
|
run: release/package_client.sh win64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user