-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (39 loc) · 1.1 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Release
on:
release:
types: [ published ]
permissions: write-all
jobs:
build:
uses: ./.github/workflows/build.yml
release:
needs:
- build
runs-on: ubuntu-latest
if: github.repository == 'iOSRealRun/iOSRealRun-cli'
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
- name: zip
run: |
for dir in iOSRealRun-cli*; do
if [ -d "$dir" ]; then
echo "------ Zip $dir ----------"
(cd $dir && zip -r9 "$dir".zip ./* && mv "$dir".zip ../)
fi
done
- name: Display structure of downloaded files
run: ls -R
- name: Upload Release
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for file in iOSRealRun-cli*.zip; do
if [ -f "$file" ]; then
echo "------ Upload $file ----------"
gh release upload ${{ github.event.release.tag_name }} "$file"
fi
done