Skip to content

Commit a25e5ba

Browse files
authored
[BRE-1194] update publish-gh-release to every hour when triggered by publish-store (#1945)
1 parent 8312821 commit a25e5ba

File tree

4 files changed

+70
-37
lines changed

4 files changed

+70
-37
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish GitHub Release as newest
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 * * * 1-5' # Every hour on the hour on weekdays
7+
8+
permissions:
9+
contents: write
10+
actions: read
11+
id-token: write
12+
13+
jobs:
14+
publish-release-authenticator:
15+
name: Publish Authenticator Release
16+
uses: bitwarden/gh-actions/.github/workflows/_publish-mobile-github-release.yml@main
17+
with:
18+
workflow_name: "publish-github-release-bwa.yml"
19+
credentials_filename: "appstoreconnect-fastlane.json"
20+
project_type: ios
21+
check_release_command: >
22+
bundle exec fastlane ios get_latest_version api_key_path:$CREDENTIALS_PATH app_identifier:com.bitwarden.authenticator
23+
secrets: inherit
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish GitHub Release as newest
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 * * * 1-5' # Every hour on the hour on weekdays
7+
8+
permissions:
9+
contents: write
10+
actions: read
11+
id-token: write
12+
13+
jobs:
14+
publish-release-password-manager:
15+
name: Publish Password Manager Release
16+
uses: bitwarden/gh-actions/.github/workflows/_publish-mobile-github-release.yml@main
17+
with:
18+
workflow_name: "publish-github-release-bwpm.yml"
19+
credentials_filename: "appstoreconnect-fastlane.json"
20+
project_type: ios
21+
check_release_command: >
22+
bundle exec fastlane ios get_latest_version api_key_path:$CREDENTIALS_PATH app_identifier:com.8bit.bitwarden
23+
secrets: inherit

.github/workflows/publish-github-release.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/publish-store.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
name: Publish to iOS App Store
3-
run-name: Publish ${{ inputs.product }} build ${{ inputs.build-number }} version ${{inputs.build-version}}
3+
run-name: >
4+
${{ inputs.dry-run && ' (Dry Run)' || '' }} Publish ${{ inputs.product }} build ${{ inputs.build-number }} version ${{ inputs.build-version }}
45
56
on:
67
workflow_dispatch:
@@ -30,6 +31,10 @@ on:
3031
description: "Automatically submit release for review"
3132
type: boolean
3233
default: true
34+
dry-run:
35+
description: "Dry-Run, Run the workflow without publishing to the store"
36+
type: boolean
37+
default: false
3338

3439
env:
3540
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -39,6 +44,7 @@ permissions:
3944
contents: read
4045
packages: read
4146
id-token: write
47+
actions: write
4248

4349
jobs:
4450
publish:
@@ -99,6 +105,8 @@ jobs:
99105
EOF
100106
101107
- name: Upload app to with Fastlane
108+
id: publish
109+
if: ${{ inputs.dry-run == false }}
102110
env:
103111
VERSION_CODE: ${{ inputs.build-number }}
104112
VERSION_NAME: ${{inputs.build-version}}
@@ -128,3 +136,18 @@ jobs:
128136
changelog:"$CHANGELOG" \
129137
metadata_path:"$METADATA_PATH" \
130138
submit_release:"$SUBMIT_RELEASE"
139+
140+
- name: Enable Publish Github Release Workflow
141+
if: ${{ steps.publish.conclusion == 'success' }}
142+
env:
143+
PRODUCT: ${{ inputs.product }}
144+
run: |
145+
if ${{ inputs.dry-run }} ; then
146+
gh workflow view publish-github-release.yml
147+
exit 0
148+
fi
149+
if [ "$PRODUCT" = "Password Manager" ]; then
150+
gh workflow enable publish-github-release-bwpm.yml
151+
elif [ "$PRODUCT" = "Authenticator" ]; then
152+
gh workflow enable publish-github-release-bwa.yml
153+
fi

0 commit comments

Comments
 (0)