-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create build & release pipeline
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build & Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build (macOS) | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup NodeJS | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/* | ||
cache: npm | ||
|
||
- name: Set macOS signing certs | ||
uses: apple-actions/import-codesign-certs@v1 | ||
with: | ||
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }} | ||
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }} | ||
|
||
- name: NPM Install | ||
run: npm ci | ||
|
||
- name: Build, Package, & Release | ||
run: npm run publish | ||
env: | ||
APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }} | ||
APPLE_BUNDLE_ID: ${{ secrets.APPLE_BUNDLE_ID }} | ||
APPLE_USER_ID: ${{ secrets.APPLE_USER_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# UGRC API Client | ||
|
||
## Deployment Pipeline Setup | ||
|
||
1. Export the developer id application certificate as a p12 via keychain -> export. | ||
1. Store the password and the base64-encoded as: | ||
|
||
- `gh secret set CERTIFICATES_P12 -b$(base64 -i ~/Certificates.p12) --env=prod` | ||
- `gh secret set CERTIFICATES_P12_PASSWORD -b<password> --env=prod` | ||
|
||
1. Add the rest of the environment variables as secrets: | ||
- `APPLE_IDENTITY` | ||
- `APPLE_BUNDLE_ID` | ||
- `APPLE_USER_ID` | ||
- `APPLE_PASSWORD` | ||
|
||
## Cutting a New Release | ||
|
||
From a branch: | ||
|
||
1. `npm version (major | minor | patch) -m "release: %s"` | ||
1. `npm run publish` | ||
1. Finish [draft release](https://github.com/agrc/api-client/releases) |