Skip to content

Commit

Permalink
improve dist folder packing in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sdumetz committed Dec 17, 2024
1 parent c6e4b88 commit 6d2c1cb
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ jobs:
- uses: actions/upload-artifact@v4
if: matrix.node-version == 16
with:
name: "server-files"
name: "server"
path: |
source/server/dist/*
!source/server/dist/*.test.js
!source/server/dist/*.test.js.map
!source/server/dist/__test_fixtures/**
source/server/package.json
source/server/package-lock.json
source/server/migrations/
Expand All @@ -67,22 +71,16 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
path: eCorpus-unpacked
path: eCorpus
- name: edit run scripts
working-directory: eCorpus-unpacked
working-directory: eCorpus
run: |
jq '.scripts.start ="node server/index.js"' ./server-files/package.json > "package.json"
rm server-files/package.json
mv server-files/* ./
rm -r server-files
- name: make tarball
working-directory: eCorpus-unpacked
run: |
tar -zcf ../eCorpus-${{github.ref_name}}.tgz ./*
mv server/* ./
rm -r server
- uses: actions/upload-artifact@v4
with:
name: "dist"
path: "eCorpus-*.tgz"
name: "eCorpus-${{github.ref_name}}"
path: eCorpus
if-no-files-found: error
retention-days: 10

0 comments on commit 6d2c1cb

Please sign in to comment.