Skip to content

Commit

Permalink
ci: added ability to publish test packages (#6389)
Browse files Browse the repository at this point in the history
* ci: added ability to publish test packages
  • Loading branch information
shairez authored Jun 7, 2024
1 parent f6fc2f8 commit 1b1429b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 50 deletions.
56 changes: 33 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
- 'build/**'
workflow_dispatch:
inputs:
node_version:
description: 'Node version to use for the build'
required: false
type: string
default: '20.x'
disttag:
description: 'Publish "@builder.io/qwik" to NPM using this dist-tag, push the git-tag to the repo and create a GitHub release. The "latest" and "next" dist-tags will use the version number already committed in package.json.'
required: true
Expand Down Expand Up @@ -97,12 +102,12 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand All @@ -115,7 +120,7 @@ jobs:
pnpm install --frozen-lockfile
- name: Build Packages
run: pnpm tsm scripts/index.ts --tsc --build --cli --api --qwiklabs --eslint --platform-binding-wasm-copy --set-dist-tag="${{ github.event.inputs.disttag }}"
run: pnpm tsm scripts/index.ts --tsc --build --cli --api --qwiklabs --qwikcity --eslint --platform-binding-wasm-copy --set-dist-tag="${{ github.event.inputs.disttag }}"

- name: Print Qwik Dist Build
run: tree packages/qwik/dist/
Expand Down Expand Up @@ -150,7 +155,12 @@ jobs:
path: packages/eslint-plugin-qwik/dist/
if-no-files-found: error

############ BUILD WASM ############
- name: Publish packages for testing
run: pnpm dlx [email protected] publish --compact --pnpm ./packages/qwik/dist ./packages/qwik-city/lib ./packages/eslint-plugin-qwik/dist ./packages/create-qwik/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

############ BUILD WASM #############
build-wasm:
name: Build WASM
runs-on: ubuntu-latest
Expand All @@ -165,14 +175,14 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4
if: ${{ needs.changes.outputs.fullbuild == 'true' }}

- name: Setup Node
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand Down Expand Up @@ -258,14 +268,14 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4
if: ${{ needs.changes.outputs.fullbuild == 'true' }}

- name: Setup Node
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand Down Expand Up @@ -325,14 +335,14 @@ jobs:
if: ${{ needs.changes.outputs.insightsbuild == 'true' }}
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4
if: ${{ needs.changes.outputs.insightsbuild == 'true' }}

- name: Setup Node
if: ${{ needs.changes.outputs.insightsbuild == 'true' }}
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand All @@ -358,12 +368,12 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand Down Expand Up @@ -402,14 +412,14 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4
if: ${{ needs.changes.outputs.fullbuild == 'true' }}

- name: Setup Node
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand Down Expand Up @@ -501,12 +511,12 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand Down Expand Up @@ -572,10 +582,10 @@ jobs:
settings:
- host: ubuntu-latest
browser: chromium
node: 18.x
node: 20.x
- host: macos-latest
browser: webkit
node: 18.x
node: 20.x

runs-on: ${{ matrix.settings.host }}

Expand All @@ -584,7 +594,7 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4
if: ${{ needs.changes.outputs.fullbuild == 'true' }}

- name: Setup Node ${{ matrix.settings.node }}
Expand Down Expand Up @@ -645,12 +655,12 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand Down Expand Up @@ -741,12 +751,12 @@ jobs:
- name: Checkout
uses: actions/[email protected]

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

Expand Down
27 changes: 0 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b1429b

Please sign in to comment.