From d41fbfb498c826c58aa24b762b3c7cdb799b338a Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 19 Dec 2024 20:42:46 -0500 Subject: [PATCH] release: generate build artifacts prior to release this makes sure they are in the release git commit, which is prepared before the prepublishOnly task generates these things otherwise --- .github/workflows/publish.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d23b5fc3..cf46c9ef 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,15 +31,23 @@ jobs: distribution: 'temurin' java-version: '17' - # semantic-release uses npm to do final prepare + package + publish # npm will not tolerate node_modules directories installed via yarn # so yarn must not be used in this workflow # there will be errors related to pod-install but we can ignore them - name: Install dependencies using NPM run: npm i + + # The release script runs packages/react-native/package.json::prepublishOnly + # which will generate these artifacts, but it does that *after* it commits + # to git, so we don't get the Android AAR or the reference API typedoc unless + # we generate them prior to running the release + - name: Generate artifacts before release + run: | + npm run build:core + npm run gen:reference - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release \ No newline at end of file + run: npx semantic-release