From 519edf8749e8f7087f3e84dc221f1fd3a06d188b Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 23 May 2023 16:06:28 -0500 Subject: [PATCH] refactor: Add redirect for publishing action The publishing action assumes that main in package.json points to the entrypoint of the action. Since v1.2.0, however, that is no longer the case. Rather than try a new system (or dive deep into the internals of npm and what every directive means), we'll trick the action into uploading the correct script by modifying the package.json file right before upload. Add that hack. --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8faa980..34da53c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,6 +16,7 @@ jobs: - run: npm ci - run: npm run build - run: npm run package + - run: sed -i 's%lib/src/main.js%dist/index.js%' package.json - uses: JasonEtco/build-and-tag-action@v1 env: GITHUB_TOKEN: ${{ github.token }}