Skip to content

Commit 87bcbec

Browse files
authored
Update WF (#27)
1 parent 068af31 commit 87bcbec

File tree

1 file changed

+66
-8
lines changed

1 file changed

+66
-8
lines changed

.github/workflows/publish.yml

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
name: "Publish App Store"
1+
name: "Publish"
22

33
on:
44
release:
55
types: [published]
66

77
concurrency:
8-
group: ${{ github.workflow }}
8+
group: ${{ github.workflow }}-${{ github.ref }}
99
cancel-in-progress: true
1010

11+
env:
12+
command: ${{ github.event.release.prerelease && 'beta' || 'push_appstore' }}
13+
1114
jobs:
12-
build:
13-
if: ${{ !github.event.release.prerelease }}
14-
runs-on: ["macos-15"]
15+
publish:
16+
name: "Publish"
17+
runs-on: macos-15
18+
timeout-minutes: 30
1519

1620
steps:
1721
- name: "Checkout"
@@ -25,15 +29,15 @@ jobs:
2529
- name: "Debug Run Number"
2630
continue-on-error: true
2731
run: |
28-
echo "run_number: ${{ steps.run.outputs.number }}"
32+
echo "number: ${{ steps.run.outputs.number }}"
2933
3034
- name: "Add SSH Key"
3135
uses: webfactory/[email protected]
3236
with:
3337
ssh-private-key: ${{ secrets.SSH_KEY }}
3438

35-
- name: "Publish App"
36-
run: fastlane ${{ github.event.release.prerelease && 'beta' || 'push_appstore' }}
39+
- name: "Fastlane ${{ env.command }}"
40+
run: fastlane ${{ env.command }}
3741
env:
3842
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
3943
MATCH_URL: [email protected]:django-files/ios-match-certs.git
@@ -44,3 +48,57 @@ jobs:
4448
ASC_API_ID: ${{ secrets.ASC_API_ID }}
4549
BUILD_NUMBER: ${{ steps.run.outputs.number }}
4650
VERSION_NUMBER: ${{ github.event.release.tag_name }}
51+
52+
- name: "Debug Fastlane"
53+
if: ${{ !github.event.act }}
54+
continue-on-error: true
55+
run: |
56+
ls -lAh .
57+
ls -lAh fastlane/metadata
58+
ls -lAh fastlane/screenshots
59+
60+
- name: "Upload Metadata"
61+
if: ${{ !github.event.act }}
62+
continue-on-error: true
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: ${{ github.repository_owner }}-metadata
66+
path: "fastlane/metadata"
67+
68+
- name: "Upload Screenshots"
69+
if: ${{ !github.event.act }}
70+
continue-on-error: true
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: ${{ github.repository_owner }}-screenshots
74+
path: "fastlane/screenshots"
75+
76+
- name: "Upload IPA"
77+
if: ${{ !github.event.act }}
78+
continue-on-error: true
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: ${{ github.repository_owner }}-${{ env.command }}
82+
path: "Django Files.ipa"
83+
84+
- name: "Upload IPA to Release"
85+
if: ${{ github.event_name == 'release' }}
86+
continue-on-error: true
87+
uses: svenstaro/upload-release-action@v2
88+
with:
89+
file: "Django Files.ipa"
90+
tag: ${{ github.ref }}
91+
overwrite: true
92+
93+
- name: "Update Release Notes Action"
94+
if: ${{ github.event_name == 'release' }}
95+
continue-on-error: true
96+
uses: smashedr/update-release-notes-action@master
97+
with:
98+
type: generic
99+
100+
- name: "Send Failure Notification"
101+
if: ${{ failure() && github.event_name == 'release' }}
102+
uses: sarisia/actions-status-discord@v1
103+
with:
104+
webhook: ${{ secrets.DISCORD_WEBHOOK }}

0 commit comments

Comments
 (0)