From 69cadae03a701f736422241349ba3c2f47c4e454 Mon Sep 17 00:00:00 2001 From: Vinayak Date: Tue, 1 Aug 2023 00:15:35 -0700 Subject: [PATCH] Automating the sift react native releases. --- .github/workflows/react_native_release.yml | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/react_native_release.yml diff --git a/.github/workflows/react_native_release.yml b/.github/workflows/react_native_release.yml new file mode 100644 index 0000000..a0a511b --- /dev/null +++ b/.github/workflows/react_native_release.yml @@ -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 +# - name: Release the package +# run: | +# npm run release -- --yes +# git push --follow-tags + + - 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'