Skip to content

Commit

Permalink
chore(release): optimize workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
guesant committed Oct 31, 2024
1 parent 5f4027e commit d610638
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Build, Push and Deploy
name: "CD: Build, Push and Deploy"

on:
workflow_dispatch:
push:
branches:
- development
- production
workflow_call:
# workflow_dispatch:
# push:
# branches:
# - development
# - production

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate Integrations
name: "CI: Generate Integrations"

on:
push:
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/continuos-build-publish.yml

This file was deleted.

36 changes: 34 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
outputs:
published: ${{ steps.changesets.outputs.published }}
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
publish-npm: "true"
publish-npm: ${{ steps.changesets.outputs.published }}

permissions:
pages: read
Expand Down Expand Up @@ -71,6 +71,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
name: Show the release job outputs
runs-on: ubuntu-latest
needs: [release]

Expand All @@ -83,7 +84,7 @@ jobs:
runs-on: ubuntu-latest

needs: [release]
if: needs.release.outputs.published == 'true'
if: needs.release.outputs.published == 'true' && needs.release.outputs.publish-npm == 'true'

permissions:
actions: read
Expand All @@ -98,3 +99,34 @@ jobs:
uses: ./.github/actions/publish/npm
with:
npm-token: "${{ secrets.NPM_TOKEN }}"

edge-publish-npm:
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"
install-dotnet: "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/especificacao'

cd-build-push-deploy:
name: "CD: Build, Push and Deploy"
uses: ./.github/workflows/cd-build-push-deploy.yml
secrets: inherit
needs: [release]

0 comments on commit d610638

Please sign in to comment.