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

Automating the sift react native releases. #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
41 changes: 41 additions & 0 deletions .github/workflows/react_native_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
release:
types: [published]

env:
GH_TOKEN: ${{ github.token }}

jobs:
release:
name: Perform the Release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

# Release arent available, uncomment below lines when release is available

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why the step to perform the release is commented out? Sounds like the release should actually run as part of this workflow?

# - name: Release the package
# run: |
# npm run release -- --yes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the runbook, it looks like the npm run release command will ask for a TOTP to authenticate for NPM. Does this --yes flag work around that?

# git push --follow-tags

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we run git push? I don't see that step in the release runbook


- name: Check release on npm
run: npm show sift-react-native version

- name: Check release on GitHub
run: |
curl -s https://api.github.com/repos/SiftScience/sift-react-native/releases/latest | jq -r '.tag_name'