Skip to content

Commit 72c711b

Browse files
committed
chore(ci): remove matrix
1 parent cd3d556 commit 72c711b

1 file changed

Lines changed: 19 additions & 37 deletions

File tree

.github/workflows/publish.yml

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,23 @@ jobs:
2626
uses: actions/cache@v3
2727
with:
2828
path: node_modules
29-
key: packages-${{ hashFiles('pnpm-lock.yaml') }}
29+
key: packages-${{ hashFiles('yarn.lock') }}
3030
restore-keys: |
3131
packages-
32-
- name: Install Pnpm
33-
run: npm i -g pnpm
34-
- name: Pnpm Install
35-
run: pnpm install
32+
- name: Install
33+
run: yarn install
3634
- name: Lint
37-
run: pnpm lint
35+
run: yarn lint
3836
- name: Build
39-
run: pnpm build
37+
run: yarn build
4038
- name: Upload Build Artifact
4139
uses: actions/upload-artifact@v4
4240
with:
4341
name: build-artifact
4442
path: ./
45-
43+
4644
should-release:
4745
needs: [build]
48-
strategy:
49-
fail-fast: false
50-
matrix:
51-
app: [antd, layout, tailwind]
5246
name: Should Release
5347
runs-on: ubuntu-latest
5448
steps:
@@ -60,28 +54,20 @@ jobs:
6054
run: npm i -g semver
6155
- name: Run should-release
6256
shell: bash
63-
run: scripts/should-release.sh packages/${{ matrix.app }}/package.json
57+
run: scripts/should-release.sh packages/your-lib/package.json
6458
- name: Current Version
6559
id: current-version
66-
run: echo '${{ matrix.app }}_current_version='$(node -p -e "require('./packages/${{ matrix.app }}/package.json').version") >> $GITHUB_OUTPUT
60+
run: echo 'current_version='$(node -p -e "require('./packages/your-lib/package.json').version") >> $GITHUB_OUTPUT
6761
- name: Check Skip Release
6862
id: skip-release
69-
run: echo '${{ matrix.app }}_skip='$(cat .skip-release) >> $GITHUB_OUTPUT
63+
run: echo 'skip='$(cat .skip-release) >> $GITHUB_OUTPUT
7064
outputs:
71-
antd_skip: ${{ steps.skip-release.outputs.antd_skip }}
72-
antd_current_version: ${{ steps.current-version.outputs.antd_current_version }}
73-
tailwind_skip: ${{ steps.skip-release.outputs.tailwind_skip }}
74-
tailwind_current_version: ${{ steps.current-version.outputs.tailwind_current_version }}
75-
layout_skip: ${{ steps.skip-release.outputs.layout_skip }}
76-
layout_current_version: ${{ steps.current-version.outputs.layout_current_version }}
65+
skip: ${{ steps.skip-release.outputs.skip }}
66+
current_version: ${{ steps.current-version.outputs.current_version }}
7767

7868
release-candidate:
7969
needs: [should-release]
8070
if: github.ref != 'refs/heads/master' && (startsWith(github.ref, 'refs/heads/feature-') || startsWith(github.ref, 'refs/heads/hotfix-') || startsWith(github.ref, 'refs/heads/release-'))
81-
strategy:
82-
fail-fast: false
83-
matrix:
84-
app: [antd, layout, tailwind]
8571
name: Release Candidate
8672
runs-on: ubuntu-latest
8773
steps:
@@ -92,10 +78,10 @@ jobs:
9278
name: build-artifact
9379
path: ./
9480
- name: Update package.json with RC version
95-
if: ${{ needs.should-release.outputs[format('{0}_skip', matrix.app)] != 'true' }}
96-
run: scripts/rc.sh packages/${{ matrix.app }}/package.json
81+
if: ${{ needs.should-release.outputs.skip != 'true' }}
82+
run: scripts/rc.sh packages/your-lib/package.json
9783
- name: Upload Updated Artifact
98-
if: ${{ needs.should-release.outputs[format('{0}_skip', matrix.app)] != 'true' }}
84+
if: ${{ needs.should-release.outputs.skip != 'true' }}
9985
uses: actions/upload-artifact@v4
10086
with:
10187
name: build-artifact
@@ -105,23 +91,19 @@ jobs:
10591
publish:
10692
needs: [should-release, release-candidate]
10793
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/hotfix-') || startsWith(github.ref, 'refs/heads/release-')
108-
strategy:
109-
fail-fast: false
110-
matrix:
111-
app: [antd, layout, tailwind]
11294
name: Publish
11395
runs-on: ubuntu-latest
11496
steps:
11597
- uses: actions/checkout@v4
11698
- id: npm-publish
117-
if: ${{ needs.should-release.outputs[format('{0}_skip', matrix.app)] != 'true' }}
99+
if: ${{ needs.should-release.outputs.skip != 'true' }}
118100
uses: ./.github/actions/npm-publish
119101
with:
120102
github-token: ${{ secrets.GITHUB_TOKEN }}
121-
version: ${{ needs.should-release.outputs[format('{0}_current_version', matrix.app)] }}
103+
version: ${{ needs.should-release.outputs.current_version }}
122104
npm-auth-token: ${{ secrets.NPM_AUTH_TOKEN }}
123-
path: ./packages/${{ matrix.app }}
124-
105+
path: ./packages/your-lib
106+
125107
create-tag:
126108
needs: [publish]
127109
if: github.ref == 'refs/heads/master'
@@ -157,7 +139,7 @@ jobs:
157139
webhook-url: ${{ secrets.PI_DISCORD_WEBHOOK }}
158140
title: "${{ github.repository }}/${{ github.ref_name }}"
159141
url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
160-
description: "🎨 DEPLOYED / Uma linha de CSS =]"
142+
description: "🫡 DEPLOYED / Linterzinhiúu =]"
161143
color: 65280
162144
footer-text: "${{ github.sha }} - ${{ github.event.head_commit.message }}"
163145
- name: Discord Message on Failure

0 commit comments

Comments
 (0)