-
Notifications
You must be signed in to change notification settings - Fork 444
48 lines (42 loc) · 1.3 KB
/
build.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
43
44
45
46
47
48
name: Build workflow
on:
pull_request:
push:
branches: [ "main" ]
jobs:
build:
name: Build ipa
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build
env:
scheme: ${{ 'default' }}
platform: ${{ 'iOS Simulator' }}
run: |
bundle install -j 4
bundle exec fastlane build_unsign_ipa
- name: List, filter and delete artifacts
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/github-script@v6
id: artifact
with:
script: |
const { owner, repo } = context.issue
const res = await github.rest.actions.listArtifactsForRepo({
owner,
repo,
})
res.data.artifacts
.forEach(({ id }) => { github.rest.actions.deleteArtifact({ owner, repo, artifact_id: id, }) })
- name: Upload latest artifact
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: main-unsigned.ipa
path: BilbiliAtvDemo.ipa
retention-days: 30