Skip to content

Commit

Permalink
fix github actions builds
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotoNomad0 committed Nov 3, 2021
1 parent 7c549bd commit e2d8c61
Showing 1 changed file with 49 additions and 6 deletions.
55 changes: 49 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# run: echo "$GITHUB_CONTEXT"
- uses: actions/setup-node@v1
with:
node-version: '16.4.0'
node-version: '16.4.2'
- name: Node version
run: |
node --version
Expand All @@ -54,7 +54,11 @@ jobs:
submodules: recursive

- name: npm install
run: npm ci
run: |
# Fix for problem of cached files from older npm versions, move npm cache to temp directory
TMPDIR=$(mktemp -d)
echo "$TMPDIR"
npm ci --cache="$TMPDIR"
- name: npm test
run: npm run ci-test
Expand Down Expand Up @@ -115,15 +119,30 @@ jobs:
echo "BUILD=$HASH" >> .env.tmp
- name: npm install
run: npm ci
run: |
# Fix for problem of cached files from older npm versions, move npm cache to temp directory
TMPDIR=$(mktemp -d)
echo "$TMPDIR"
npm ci --cache="$TMPDIR"
- name: Download latest language names
if: env.UPDATE_RESOURCES
run: curl https://td.unfoldingword.org/exports/langnames.json > src/assets/langnames.json

- name: Before Update resources - save original manifest
run: cp tcResources/source-content-updater-manifest.json source-content-updater-manifest.json.orig

- name: Update resources
if: env.UPDATE_RESOURCES
run: npm run update-resources
# add automatic retry
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
retry_on: error
command: npm run update-resources
# restore original manifest before retry
on_retry_command: cp source-content-updater-manifest.json.orig tcResources/source-content-updater-manifest.json

- name: build linux
id: build
Expand Down Expand Up @@ -191,9 +210,22 @@ jobs:
if: env.UPDATE_RESOURCES
run: curl https://td.unfoldingword.org/exports/langnames.json > src/assets/langnames.json

- name: Before Update resources - save original manifest
shell: bash
run: cp tcResources/source-content-updater-manifest.json source-content-updater-manifest.json.orig

- name: Update resources
if: env.UPDATE_RESOURCES
run: npm run update-resources
# add automatic retry
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
retry_on: error
shell: bash
command: npm run update-resources
# restore original manifest before retry
on_retry_command: cp source-content-updater-manifest.json.orig tcResources/source-content-updater-manifest.json

- name: build windows
run: |
Expand Down Expand Up @@ -291,9 +323,20 @@ jobs:
if: env.UPDATE_RESOURCES
run: curl https://td.unfoldingword.org/exports/langnames.json > src/assets/langnames.json

- name: Before Update resources - save original manifest
run: cp tcResources/source-content-updater-manifest.json source-content-updater-manifest.json.orig

- name: Update resources
if: env.UPDATE_RESOURCES
run: npm run update-resources
# add automatic retry
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
retry_on: error
command: npm run update-resources
# restore original manifest before retry
on_retry_command: cp source-content-updater-manifest.json.orig tcResources/source-content-updater-manifest.json

- name: build macOS
id: build
Expand Down

0 comments on commit e2d8c61

Please sign in to comment.