Skip to content

Commit bee5381

Browse files
committed
Add release action for MacOS libssh
[macos-libssh]
1 parent 2fcff0a commit bee5381

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.github/workflows/build_libssh_macos.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ env:
1414
jobs:
1515
build_arch:
1616
runs-on: macos-latest
17+
if: |
18+
contains(github.event.head_commit.message, '[all]') ||
19+
contains(github.event.head_commit.message, '[macos]') ||
20+
contains(github.event.head_commit.message, '[macos-libssh]') ||
21+
contains(github.event.head_commit.message, '[libssh]')
1722
strategy:
1823
matrix:
1924
arch:
@@ -243,4 +248,29 @@ jobs:
243248
uses: actions/upload-artifact@v4
244249
with:
245250
name: libssh-fat
246-
path: libssh-fat.zip
251+
path: libssh-fat.zip
252+
253+
github-release:
254+
name: GitHub Release
255+
needs: [build_arch, build_fat]
256+
runs-on: ubuntu-latest
257+
if: startsWith(github.ref, 'refs/tags/')
258+
steps:
259+
- name: Setup | Checkout
260+
uses: actions/checkout@v2
261+
- name: Setup | Artifacts
262+
uses: actions/download-artifact@v4
263+
- name: Setup | Checksums
264+
run: for file in $(find ./ -name '*.a' ); do openssl dgst
265+
-sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
266+
- name: Zip ALL
267+
run: for file in *; do zip -r ${file%.*}.zip $file; done
268+
- name: Upload binaries to release
269+
uses: svenstaro/upload-release-action@v2
270+
with:
271+
repo_token: ${{ secrets.GITHUB_TOKEN }}
272+
file: "*.zip"
273+
tag: ${{ github.ref }}
274+
overwrite: true
275+
file_glob: true
276+

0 commit comments

Comments
 (0)