Skip to content

Commit

Permalink
Merge pull request #497 from ladesa-ro/dev/gabriel
Browse files Browse the repository at this point in the history
chore: actions/generate; split ci-edge-release;
  • Loading branch information
guesant authored Jan 26, 2025
2 parents bf33f7e + 38ac973 commit fe7c270
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .changeset/wicked-rats-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 0 additions & 2 deletions .github/actions/prepare/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ inputs:
required: false
default: "false"

# outputs: - no outputs

runs:
using: "composite"

Expand Down
17 changes: 17 additions & 0 deletions .github/actions/prepare/generate/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Prepare: Generate"
description: "Prepares the repo for a job by running the generate"

inputs:
workspace-generate:
description: "workspace project generate"
required: false
default: "false"

runs:
using: "composite"

steps:
- name: "Generate all"
if: ${{ inputs.workspace-generate == 'true' }}
shell: bash
run: pnpm run -w generate:all
34 changes: 34 additions & 0 deletions .github/workflows/ci-edge-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "CI - Edge"

on:
push:
branches:
- development

jobs:
ci-edge-npm:
name: npm packages publish

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install
uses: ./.github/actions/prepare/install
with:
install-node: "true"

- name: "generate:all"
uses: ./.github/actions/prepare/generate
with:
workspace-generate: "true"

- name: "build:all"
uses: ./.github/actions/prepare/build
with:
workspace-build: "true"

- name: "Continuos Release: publish to pkg.pr.new"
run: pnpx pkg-pr-new publish --comment=update './integrations/npm/api-client-fetch'
24 changes: 0 additions & 24 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,3 @@ jobs:
with:
tag: "${{ steps.extract-tag.outputs.tag }}"
npm-token: "${{ secrets.NPM_TOKEN }}"

ci_npm_edge:
name: Edge NPM package publish
runs-on: ubuntu-latest

needs: [release]
if: needs.release.outputs.published == 'false'

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install
uses: ./.github/actions/prepare/install
with:
install-node: "true"

- name: Build
uses: ./.github/actions/prepare/build
with:
workspace-build: "true"

- name: "Continuos Release: publish to pkg.pr.new"
run: pnpx pkg-pr-new publish --comment=update './integrations/npm/api-client-fetch'
11 changes: 9 additions & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ jobs:
with:
install-node: "true"

- name: The generation and build should work
run: pnpm run -w generate:all && pnpm run -w build:all;
- name: "generate:all should work"
uses: ./.github/actions/prepare/generate
with:
workspace-generate: "true"

- name: "build:all should work"
uses: ./.github/actions/prepare/build
with:
workspace-build: "true"

- name: Require to pass static code check
run: |
Expand Down

0 comments on commit fe7c270

Please sign in to comment.