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 f57f4b6
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 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 @@ -71,18 +75,13 @@ jobs:
- name: edit run scripts
working-directory: eCorpus-unpacked
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 ./*
rm server/package.json
mv server/* ./
rm -r server
- uses: actions/upload-artifact@v4
with:
name: "dist"
path: "eCorpus-*.tgz"
name: "eCorpus-${{github.ref_name}}"
path: eCorpus-unpacked/*
if-no-files-found: error
retention-days: 10

0 comments on commit f57f4b6

Please sign in to comment.