Skip to content

Commit

Permalink
Add config files for macOS and Windows (#80)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/72649045549333/1207587223508406/f

Description:
This change adds empty config files for macOS and Windows and workflows to publish them to production and staging
(copied over from existing iOS workflows and adjusted as needed).
  • Loading branch information
ayoy authored Jul 3, 2024
1 parent 21a5124 commit f5124fd
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/PR-to-staging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PR to staging

on:
on:
push:
paths:
- 'live/android-config/android-config.json'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-PR-to-staging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PR to staging

on:
on:
push:
paths:
- 'live/ios-config/ios-config.json'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ios-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
paths:
- 'live/ios-config/ios-config.json'
workflow_dispatch:

jobs:
publish:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/macos-PR-to-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PR to staging (macOS)

on:
push:
paths:
- 'live/macos-config/macos-config.json'
pull_request:
types:
- opened
paths:
- 'live/macos-config/macos-config.json'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311
if: github.event_name == 'push'
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'live/macos-config'
DEST_DIR: 'remotemessaging/config/staging'
- uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b
if: github.event.action == 'opened'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message: 'Your PR is hosted at https://staticcdn.duckduckgo.com/remotemessaging/config/staging/macos-config.json'
24 changes: 24 additions & 0 deletions .github/workflows/macos-build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and Publish (macOS)

on:
push:
branches:
- main
paths:
- 'live/macos-config/macos-config.json'
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'live/macos-config'
DEST_DIR: 'remotemessaging/config/v1'
32 changes: 32 additions & 0 deletions .github/workflows/windows-PR-to-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PR to staging (Windows)

on:
push:
paths:
- 'live/windows-config/windows-config.json'
pull_request:
types:
- opened
paths:
- 'live/windows-config/windows-config.json'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311
if: github.event_name == 'push'
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'live/windows-config'
DEST_DIR: 'remotemessaging/config/staging'
- uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b
if: github.event.action == 'opened'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message: 'Your PR is hosted at https://staticcdn.duckduckgo.com/remotemessaging/config/staging/windows-config.json'
24 changes: 24 additions & 0 deletions .github/workflows/windows-build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and Publish (Windows)

on:
push:
branches:
- main
paths:
- 'live/windows-config/windows-config.json'
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'live/windows-config'
DEST_DIR: 'remotemessaging/config/v1'
5 changes: 5 additions & 0 deletions live/macos-config/macos-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": 0,
"messages": [],
"rules": []
}
5 changes: 5 additions & 0 deletions live/windows-config/windows-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": 0,
"messages": [],
"rules": []
}

0 comments on commit f5124fd

Please sign in to comment.