Skip to content

Commit 68c3622

Browse files
committed
CI: make build-ripunzip.yml auto-create update PR
1 parent 3de598e commit 68c3622

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

.github/workflows/build-ripunzip.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ on:
44
workflow_dispatch:
55
inputs:
66
ripunzip-version:
7-
description: "what reference to checktout from google/runzip"
7+
description: What reference to checktout from google/runzip
88
required: false
99
openssl-version:
10-
description: "what reference to checkout from openssl/openssl for Linux"
10+
description: What reference to checkout from openssl/openssl for Linux
1111
required: false
12+
open-pr:
13+
description: Open a pull request updating the ripunzip versions committed to lfs
14+
required: false
15+
default: true # will be false on PRs
1216
pull_request:
1317
paths:
1418
- .github/workflows/build-ripunzip.yml
@@ -68,11 +72,35 @@ jobs:
6872
lipo -create -output ripunzip-macos \
6973
-arch x86_64 target/x86_64-apple-darwin/release/ripunzip \
7074
-arch arm64 target/aarch64-apple-darwin/release/ripunzip
75+
- name: Archive
76+
shell: bash
77+
run: |
78+
zip -j ripunzip-${{ runner.os }}.zip ripunzip-*
7179
- uses: actions/upload-artifact@v4
7280
with:
7381
name: ripunzip-${{ runner.os }}
74-
path: ripunzip-*
82+
path: ripunzip-${{ runner.os }}.zip
83+
retention-days: 5
84+
compression: 0
7585
- name: Check built binary
7686
shell: bash
7787
run: |
7888
./ripunzip-* --version
89+
publish:
90+
needs: build
91+
if: inputs.open-pr == 'true'
92+
runs-on: ubuntu-slim
93+
steps:
94+
- uses: actions/checkout@v5
95+
with:
96+
sparse-checkout: |
97+
.github
98+
misc/ripunzip
99+
- name: Download built binaries
100+
uses: actions/download-artifact@v4
101+
- name: Move artifacts into place
102+
shell: bash
103+
run: |
104+
mv ripunzip-ubuntu-24.04 misc/ripunzip/ripunzip-linux
105+
mv ripunzip-macos misc/ripunzip/ripunzip-macos
106+
mv ripunzip-windows misc/ripunzip/ripunzip-windows

0 commit comments

Comments
 (0)