Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: added ability to publish test packages (new test) #6462

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 32 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,11 @@ jobs:
path: packages/eslint-plugin-qwik/dist/
if-no-files-found: error

############ BUILD WASM ############
# - 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 +174,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 +267,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 +334,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 +367,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 +411,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 +510,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 +581,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 +593,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 +654,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 +750,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
55 changes: 55 additions & 0 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Qwik Packages Test Release

on:
pull_request:
push:
branches:
- main
- next
- qwik-labs
- vercelserverless
- 'build/**'

env:
# Disable incremental build, speeds up CI
CARGO_INCREMENTAL: 0

jobs:
build-package:
name: Build and release
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
if: github.event_name == 'pull_request'
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/[email protected]

- uses: pnpm/action-setup@v4

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

- run: corepack enable

- name: Install NPM Dependencies
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
pnpm install --frozen-lockfile

- name: Build Packages
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: Build Eslint rules
run: pnpm tsm scripts/index.ts --eslint

- 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 }}
Loading
Loading