From 6665d72ae9c8a875dd00d86ab7109a88c004adfe Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 24 Oct 2025 06:45:11 -0600 Subject: [PATCH 1/3] fix: add repo url to package json --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index b6cc634..0bff035 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,10 @@ { "name": "@basis-theory/react-native-elements", "version": "0.0.0", + "repository": { + "type": "git", + "url": "https://github.com/Basis-Theory/react-native-elements" + }, "scripts": { "android": "react-native run-android", "build": "bob build && node prepare.js", From 7c0a60901c26841424f2f44c22f160f86d5a6a83 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 24 Oct 2025 06:54:05 -0600 Subject: [PATCH 2/3] ci: add deploy dev action --- .github/workflows/deploy-dev.yml | 98 ++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .github/workflows/deploy-dev.yml diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml new file mode 100644 index 0000000..904cde4 --- /dev/null +++ b/.github/workflows/deploy-dev.yml @@ -0,0 +1,98 @@ +name: Deploy Dev + +on: + push: + branches: [master] + +jobs: + build-dev: + runs-on: ${{ matrix.os }} + permissions: + id-token: write + contents: read + actions: read + environment: DEV + strategy: + matrix: + node: ["20.x"] + os: [ubuntu-latest] + env: + CI: 1 + HUSKY: 0 # disables husky hooks + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_SEMANTIC_RELEASE_PAT }} + + - name: Use Node ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + # registry-url not needed - no npm publishing in dev workflow + + - name: Install deps + run: yarn --immutable --no-progress --ignore-scripts + + - name: Get New Version + id: get-new-version + uses: mathieudutour/github-tag-action@v5.2 + with: + dry_run: true + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Bump Version + run: make update-version NEW_VERSION=${{ steps.get-new-version.outputs.new_version }} + + - name: Build + run: make build + env: + SKIP_INSTALL: 1 # install with cache was done already + + create-pre-release: + runs-on: ubuntu-latest + needs: + - build-dev + strategy: + matrix: + node: ["20.x"] + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Version and Tag + id: version-and-tag + uses: mathieudutour/github-tag-action@v5.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate Release Notes + id: release-notes + uses: actions/github-script@v6 + env: + NEW_RELEASE_TAG: ${{ steps.version-and-tag.outputs.new_tag }} + with: + result-encoding: string + script: | + const { NEW_RELEASE_TAG } = process.env; + const latestRelease = await github.rest.repos.getLatestRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + }); + const releaseNotes = await github.rest.repos.generateReleaseNotes({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: NEW_RELEASE_TAG, + previous_tag_name: latestRelease.data.tag_name, + }); + return releaseNotes.data.body; + + - name: Create Pre-Release + uses: softprops/action-gh-release@v1 + with: + prerelease: true + generate_release_notes: false + body: ${{ steps.release-notes.outputs.result }} + tag_name: ${{ steps.version-and-tag.outputs.new_tag }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 828d0882d9b7db769aa97f5feb599b4f65ae5ed8 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 24 Oct 2025 07:16:23 -0600 Subject: [PATCH 3/3] ci: add dev workflow --- .github/workflows/deploy-dev.yml | 23 +++++++++++++++-------- scripts/updateversion.sh | 4 ++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 904cde4..44f4ee1 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -1,11 +1,11 @@ -name: Deploy Dev +name: Deploy Bundle to Dev on: push: branches: [master] jobs: - build-dev: + build-release: runs-on: ${{ matrix.os }} permissions: id-token: write @@ -31,8 +31,10 @@ jobs: node-version: ${{ matrix.node }} # registry-url not needed - no npm publishing in dev workflow - - name: Install deps - run: yarn --immutable --no-progress --ignore-scripts + - name: Install Deps (with cache) + uses: bahmutov/npm-install@v1 + with: + install-command: yarn --immutable --no-progress --ignore-scripts - name: Get New Version id: get-new-version @@ -52,14 +54,11 @@ jobs: create-pre-release: runs-on: ubuntu-latest needs: - - build-dev + - build-release strategy: matrix: node: ["20.x"] steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - name: Version and Tag id: version-and-tag uses: mathieudutour/github-tag-action@v5.2 @@ -96,3 +95,11 @@ jobs: tag_name: ${{ steps.version-and-tag.outputs.new_tag }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Stop Deploy Message + if: always() + uses: Basis-Theory/github-actions/deploy-slack-action@master + with: + slack-api-token: ${{ secrets.SLACK_DUCKBOT_API_KEY }} + channel: ${{ vars.SLACK_DUCKBOT_DEV_DEPLOY_CHANNEL_ID }} + status: "done" diff --git a/scripts/updateversion.sh b/scripts/updateversion.sh index b8f3ea4..540f4aa 100755 --- a/scripts/updateversion.sh +++ b/scripts/updateversion.sh @@ -3,10 +3,10 @@ set -e current_directory="$PWD" -cd $(dirname $0) +cd $(dirname $0)/.. echo "Bumping to version ${NEW_VERSION}" -jq --arg v "$NEW_VERSION" '.version = $v' ../package.json > ../package.json.tmp && mv ../package.json.tmp ../package.json +jq --arg v "$NEW_VERSION" '.version = $v' package.json > package.json.tmp && mv package.json.tmp package.json cd "$current_directory"