Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for line breaks when starting a new version from GitHub Actions #940

Merged
merged 6 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ on:
type: string
description: |
iOS changelog: Used for the App Store release notes. If the changelog
is not provided, the deployment for iOS will be skipped.
is not provided, the deployment for iOS will be skipped. Use '\n' for
line breaks.
# For web deployments, we don't have a changelog.
deploy-web-app:
type: boolean
Expand All @@ -34,6 +35,7 @@ on:
description: |
Android changelog: Used for the Google Play Store release notes. If the
changelog is not provided, the deployment for Android will be skipped.
Use '\n' for line breaks.

# Set permissions to none.
#
Expand Down Expand Up @@ -88,9 +90,14 @@ jobs:
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_PRIVATE_KEY }}
run: |
# When passing the changelog from GitHub Actions to the CLI, the line
# breaks are escaped. We need to replace them with actual line breaks.
CHANGELOG="${{ github.event.inputs.ios-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy ios \
--stage beta \
--whats-new "${{ github.event.inputs.ios-changelog }}" \
--whats-new "$CHANGELOG_WITH_NEW_LINES" \
--export-options-plist=$HOME/export_options.plist

deploy-web-app:
Expand Down Expand Up @@ -195,6 +202,11 @@ jobs:

- name: Deploy
run: |
# When passing the changelog from GitHub Actions to the CLI, the line
# breaks are escaped. We need to replace them with actual line breaks.
CHANGELOG="${{ github.event.inputs.android-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy android \
--stage beta \
--whats-new "${{ github.event.inputs.android-changelog }}"
--whats-new "$CHANGELOG_WITH_NEW_LINES"
18 changes: 15 additions & 3 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ on:
type: string
description: |
iOS changelog: Used for the App Store release notes. If the changelog
is not provided, the deployment for iOS will be skipped.
is not provided, the deployment for iOS will be skipped. Use '\n' for
line breaks.
# For web deployments, we don't have a changelog.
deploy-web-app:
type: boolean
Expand All @@ -34,6 +35,7 @@ on:
description: |
Android changelog: Used for the Google Play Store release notes. If the
changelog is not provided, the deployment for Android will be skipped.
Use '\n' for line breaks.

# Set permissions to none.
#
Expand Down Expand Up @@ -106,9 +108,14 @@ jobs:
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_PRIVATE_KEY }}
run: |
# When passing the changelog from GitHub Actions to the CLI, the line
# breaks are escaped. We need to replace them with actual line breaks.
CHANGELOG="${{ github.event.inputs.ios-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy ios \
--stage stable \
--whats-new "${{ github.event.inputs.ios-changelog }}" \
--whats-new "$CHANGELOG_WITH_NEW_LINES" \
--export-options-plist=$HOME/export_options.plist

deploy-web-app:
Expand Down Expand Up @@ -214,6 +221,11 @@ jobs:

- name: Deploy
run: |
# When passing the changelog from GitHub Actions to the CLI, the line
# breaks are escaped. We need to replace them with actual line breaks.
CHANGELOG="${{ github.event.inputs.android-changelog }}"
CHANGELOG_WITH_NEW_LINES=$(echo -e "$CHANGELOG" | sed 's/\\n/\\n/g')

sz deploy android \
--stage stable \
--whats-new "${{ github.event.inputs.android-changelog }}"
--whats-new "$CHANGELOG_WITH_NEW_LINES"
Loading