From 70562c53f7f705fb5bccd4352c8b2273ba2d78d7 Mon Sep 17 00:00:00 2001 From: itschip Date: Wed, 10 Jan 2024 21:43:30 +0100 Subject: [PATCH] ci(release): release typings and hooks I hope this works --- .github/workflows/tagged-releases.yml | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/.github/workflows/tagged-releases.yml b/.github/workflows/tagged-releases.yml index 89054574f..355772824 100644 --- a/.github/workflows/tagged-releases.yml +++ b/.github/workflows/tagged-releases.yml @@ -108,3 +108,58 @@ jobs: -H "Content-Type: application/octet-stream" \ "https://uploads.github.com/repos/project-error/npwd/releases/${{ steps.auto_release.outputs.release_id }}/assets?name=npwd.zip" \ --data-binary "@npwd.zip" + + build-npwd-packages: + name: Build NPWD packages + runs-on: ubuntu-latest + needs: create-tagged-release + + steps: + - name: Get tag + run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//} + id: get_tag + - name: Checkout source code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.ref }} + - name: Install pnpm + uses: pnpm/action-setup@v2.2.2 + with: + version: 7.29.1 + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: 16.x + cache: 'pnpm' + - name: Install dependencies + run: pnpm i --frozen-lockfile + + # Build all packages + - name: Build @npwd/types + run: | + pnpm generate:typings + cd ./packages/npwd-types + git config user.email "chip@projecterror.dev" + git config user.name "itschip" + pnpm version --new-version ${{ steps.get_tag.outputs.release_tag }} + - name: Release @npwd/types + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + package: './packages/npwd-types/package.json' + access: 'public' + + - name: Build @npwd/hooks + run: | + cd ./packages/npwd-hooks + pnpm build + git config user.email "chip@projecterror.dev" + git config user.name "itschip" + pnpm version --new-version ${{ steps.get_tag.outputs.release_tag }} + - name: Release @npwd/hooks + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + package: './packages/npwd-hooks/package.json' + access: 'public'