diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cda2b41..b8ce715 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,11 +23,17 @@ jobs: with: cache: 'pnpm' registry-url: 'https://registry.npmjs.org' + - name: Copy license and readme + run: | + cp README.md packages/electron-typed-ipc-bridge/ + cp LICENSE packages/electron-typed-ipc-bridge/ - name: Build + working-directory: packages/electron-typed-ipc-bridge run: pnpm run build - name: Publish + working-directory: packages/electron-typed-ipc-bridge run: pnpm publish --provenance --no-git-checks --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -45,6 +51,7 @@ jobs: - name: Run tests with coverage id: test + working-directory: packages/electron-typed-ipc-bridge env: TEST_RESULT: 'coverage/junit.xml' run: | @@ -63,21 +70,21 @@ jobs: uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage/coverage-final.json + files: packages/electron-typed-ipc-bridge/coverage/coverage-final.json verbose: true - name: Upload test results to Codecov uses: codecov/test-results-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ${{ steps.test.outputs.file-name }} + file: packages/electron-typed-ipc-bridge/${{ steps.test.outputs.file-name }} - name: Upload coverage report to the code climate uses: paambaati/codeclimate-action@v9 env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} with: - coverageLocations: ${{ github.workspace }}/coverage/clover.xml:clover + coverageLocations: ${{ github.workspace }}/packages/electron-typed-ipc-bridge/coverage/clover.xml:clover create-release: name: Create Release @@ -110,8 +117,8 @@ jobs: - name: Download tarball id: download run: | - APP_NAME="$(cat ./package.json |jq .name|sed -e 's/"//g'| head -n1)" - APP_VERSION="$(cat ./package.json |jq .version|sed -e 's/"//g'| head -n1)" + APP_NAME="$(cat ./package.json |jq -r .name)" + APP_VERSION="$(cat ./package.json |jq -r .version)" TAR_URL="$(pnpm view "${APP_NAME}@${APP_VERSION}" dist.tarball)" TAR_NAME="${TAR_URL##*/}" echo "URL: ${TAR_URL}" diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6d904ee..cf13f3e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -45,7 +45,7 @@ jobs: uses: ./.github/workflows/test.yml get-version: - name: Get versioon from package.json + name: Get version from package.json runs-on: ubuntu-latest needs: - check-release @@ -59,8 +59,9 @@ jobs: - name: Parse package.json id: identify-version + working-directory: packages/electron-typed-ipc-bridge run: | - APP_VERSION="$(cat ./package.json |jq .version|sed -e 's/"//g'| head -n1)" + APP_VERSION="$(cat ./package.json |jq -r .version)" if [ ! -n "${APP_VERSION}" ]; then exit 255 fi @@ -84,7 +85,7 @@ jobs: private-key: ${{ secrets.PRIVATE_KEY }} owner: ${{ github.repository_owner }} - - name: Configration for git + - name: Configuration for git run: | git config --global user.name "${GH_USER}" git config --global user.email "${GH_EMAIL}" diff --git a/.github/workflows/create-rlease-pr.yml b/.github/workflows/create-rlease-pr.yml index ec7d3d6..980debb 100644 --- a/.github/workflows/create-rlease-pr.yml +++ b/.github/workflows/create-rlease-pr.yml @@ -50,6 +50,7 @@ jobs: # You can add your own logic here based on the selected version type - name: Bump version based on input + working-directory: packages/electron-typed-ipc-bridge run: | case "${VERSION_TYPE}" in major) @@ -68,8 +69,9 @@ jobs: - name: Parse package.json id: identify-version + working-directory: packages/electron-typed-ipc-bridge run: | - APP_VERSION="$(cat ./package.json |jq .version|sed -e 's/"//g'| head -n1)" + APP_VERSION="$(cat ./package.json |jq -r .version)" if [ ! -n "${APP_VERSION}" ]; then exit 255 fi @@ -119,7 +121,7 @@ jobs: git commit -F-<