Skip to content

Commit 2e814a0

Browse files
committed
fix (project): assets build
1 parent dc03853 commit 2e814a0

File tree

2 files changed

+26
-50
lines changed

2 files changed

+26
-50
lines changed

.github/workflows/build-release-assets.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,39 +34,15 @@ jobs:
3434
name: "WP DSFR Blocks : Build project CSS and JS"
3535
uses: actions/setup-node@v4
3636
with:
37-
node-version-file: 'package.json'
38-
- run: npm install
39-
- run: npm run build
40-
working-directory: ./wp-dsfr-blocks
37+
node-version-file: './wp-dsfr-blocks/package.json'
38+
- run: cd ./wp-dsfr-blocks/ && npm install && npm run build && npm run plugin-zip && cd ../
4139

4240
- id: dsfr-theme-build-node
4341
name: "WP DSFR Theme : Build project CSS and JS"
4442
uses: actions/setup-node@v4
4543
with:
46-
node-version-file: 'package.json'
47-
- run: npm install
48-
- run: npm run build
49-
working-directory: ./wp-dsfr-theme
50-
51-
- id: build-wp-dsfr-blocks-archive
52-
name: "Build WP DSFR Blocks archive"
53-
uses: actions/setup-node@v4
54-
with:
55-
node-version-file: 'package.json'
56-
- run: |
57-
npm install
58-
npm run plugin-zip
59-
working-directory: "./wp-dsfr-blocks"
60-
61-
- id: build-wp-dsfr-theme-archive
62-
name: "Build WP DSFR Theme archive"
63-
uses: actions/setup-node@v4
64-
with:
65-
node-version-file: 'package.json'
66-
- run: |
67-
npm install
68-
npm run plugin-zip
69-
working-directory: "./wp-dsfr-theme"
44+
node-version-file: './wp-dsfr-theme/package.json'
45+
- run: cd ./wp-dsfr-theme/ && npm install && npm run build && npm run plugin-zip && cd ../
7046

7147
- id: upload-wp-dsfr-blocks-asset
7248
name: "Upload WP DSFR Blocks archive to the release"

.github/workflows/release-version.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,25 @@ jobs:
5252
- run: npm run build
5353
working-directory: ./wp-dsfr-theme
5454

55-
# - id: commit-and-push
56-
# name: "Commit and push new TAG"
57-
# run: |
58-
# # Get the version.
59-
# VERSION=${{ steps.parse.outputs.dsfr-project-version }}
60-
#
61-
# echo "Copy .distignore to .gitignore"
62-
# cp .distignore .gitignore
63-
#
64-
# echo "Configure git"
65-
# git config --local user.email "$(git log --format='%ae' HEAD^!)"
66-
# git config --local user.name "$(git log --format='%an' HEAD^!)"
67-
#
68-
# echo "Creating branch"
69-
# git checkout -b release/${VERSION}
70-
#
71-
# echo "Creating tag ${VERSION}"
72-
# git add .
73-
# git add -u
74-
# git commit -m "Release version ${VERSION}"
75-
# git tag ${VERSION}
76-
# git push --tags
55+
- id: commit-and-push
56+
name: "Commit and push new TAG"
57+
run: |
58+
# Get the version.
59+
VERSION=${{ steps.parse.outputs.dsfr-project-version }}
60+
61+
echo "Copy .distignore to .gitignore"
62+
cp .distignore .gitignore
63+
64+
echo "Configure git"
65+
git config --local user.email "$(git log --format='%ae' HEAD^!)"
66+
git config --local user.name "$(git log --format='%an' HEAD^!)"
67+
68+
echo "Creating branch"
69+
git checkout -b release/${VERSION}
70+
71+
echo "Creating tag ${VERSION}"
72+
git add .
73+
git add -u
74+
git commit -m "Release version ${VERSION}"
75+
git tag ${VERSION}
76+
git push --tags

0 commit comments

Comments
 (0)