Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macOS and Windows builds in Github Actions #6649

Merged
merged 12 commits into from
Jan 20, 2020
Merged
83 changes: 73 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ jobs:
node --version
npm --version

# - uses: actions/checkout@v2
# - name: Checkout submodules
# shell: bash
# run: |
# auth_header="$(git config --local --get http.https://github.com/.extraheader)"
# git submodule sync --recursive
# git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1

- name: Checkout codebase
uses: actions/checkout@v1
with:
Expand All @@ -46,7 +54,7 @@ jobs:

build-linux:
name: Build Linux
needs: test
# needs: test
runs-on: ubuntu-latest
container: neutrinog/concourse-tasks:latest
env:
Expand All @@ -56,6 +64,19 @@ jobs:
CI: true

steps:
- name: Node version
run: |
node --version
npm --version

# - uses: actions/checkout@v2
# - name: Checkout submodules
# shell: bash
# run: |
# auth_header="$(git config --local --get http.https://github.com/.extraheader)"
# git submodule sync --recursive
# git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1

- name: Checkout codebase
uses: actions/checkout@v1
with:
Expand All @@ -79,9 +100,11 @@ jobs:
run: npm ci

- name: Download latest language names
if: env.UPDATE_RESOURCES
run: curl https://td.unfoldingword.org/exports/langnames.json > src/assets/langnames.json

- name: Update resources
if: env.UPDATE_RESOURCES
run: npm run update-resources

- name: build linux
Expand All @@ -99,7 +122,7 @@ jobs:

build-windows:
name: Build Windows
needs: test
# needs: test
runs-on: windows-latest
env:
TC_HELP_DESK_TOKEN: ${{ secrets.TC_HELP_DESK_TOKEN }}
Expand All @@ -108,10 +131,27 @@ jobs:
CI: true

steps:
- name: Checkout codebase
uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
submodules: recursive
node-version: '8.16.1'

- name: Node version
run: |
node --version
npm --version

- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1

# - name: Checkout codebase
# uses: actions/checkout@v1
# with:
# submodules: recursive

- name: Read version and commit sha
run:
Expand All @@ -129,9 +169,11 @@ jobs:
run: npm ci

- name: Download latest language names
if: env.UPDATE_RESOURCES
run: curl https://td.unfoldingword.org/exports/langnames.json > src/assets/langnames.json

- name: Update resources
if: env.UPDATE_RESOURCES
run: npm run update-resources

- name: build windows
Expand Down Expand Up @@ -175,7 +217,7 @@ jobs:

build-macos:
name: Build macOS
needs: test
# needs: test
runs-on: macos-latest
env:
TC_HELP_DESK_TOKEN: ${{ secrets.TC_HELP_DESK_TOKEN }}
Expand All @@ -184,10 +226,27 @@ jobs:
CI: true

steps:
- name: Checkout codebase
uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
submodules: recursive
node-version: '8.16.1'

- name: Node version
run: |
node --version
npm --version

- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1

# - name: Checkout codebase
# uses: actions/checkout@v1
# with:
# submodules: recursive

- name: Read version and commit sha
run: |
Expand All @@ -207,17 +266,21 @@ jobs:
run: npm ci

- name: Download latest language names
if: env.UPDATE_RESOURCES
run: curl https://td.unfoldingword.org/exports/langnames.json > src/assets/langnames.json

- name: Update resources
if: env.UPDATE_RESOURCES
run: npm run update-resources

- name: build macOS
id: build
run: |
echo "Building $APP_VERSION-$HASH"
./node_modules/.bin/gulp build --macos
./node_modules/.bin/gulp release-macos --out=../artifacts/$ARTIFACT_NAME

- name: bundle macOS
run: ./node_modules/.bin/gulp release-macos --out=../artifacts/$ARTIFACT_NAME

- uses: actions/upload-artifact@v1
name: Upload artifacts
Expand Down
Loading