Skip to content

Commit

Permalink
feat: create build & release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis authored and steveoh committed Oct 12, 2021
1 parent 86cc269 commit c81e9e0
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
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 }}
23 changes: 23 additions & 0 deletions README.md
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)

0 comments on commit c81e9e0

Please sign in to comment.