diff --git a/.travis.yml b/.travis.yml index af508c88dde..8733390d2de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -171,7 +171,7 @@ matrix: # we use the xcode provides clang and don't install our own env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="10" after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: osx osx_image: xcode9.2 @@ -179,7 +179,7 @@ matrix: # we use the xcode provides clang and don't install our own env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="12" after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: osx osx_image: xcode9.2 @@ -187,7 +187,7 @@ matrix: # we use the xcode provides clang and don't install our own env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="14" after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh # Shared Library - os: linux @@ -221,7 +221,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -245,7 +245,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -269,7 +269,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -293,7 +293,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -317,7 +317,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -341,7 +341,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: osx stage: optional @@ -350,7 +350,7 @@ matrix: # we use the xcode provides clang and don't install our own env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="node" after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -374,7 +374,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -398,7 +398,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: osx osx_image: xcode9.2 @@ -406,7 +406,7 @@ matrix: # we use the xcode provides clang and don't install our own env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="--lts" after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -430,7 +430,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh - os: linux sudo: false @@ -454,7 +454,7 @@ matrix: script: - npm run nodejs-tests after_success: - - ./scripts/travis/publish.sh + - ./scripts/travis/node_package.sh allow_failures: - compiler: "mason-osx-release-node-latest" @@ -572,3 +572,14 @@ script: - | - popd - npm test + +deploy: + provider: releases + api_key: + secure: "bSMTxzqgbAcOEszxOvv5FIBmv+BW70IobEHvxe0ShM+ekhLKwKTb5KQRj55ZjpmSEOwqvDr3S1vuqcgXegQvOcLy3HNhxg3aWisexKsbF2oGZdKyjMnyC6jURkXGQUoUoZyCbaOxV1ThJgpcWLjt5qVSR165Az7LxvCrdBer66E=" + skip_cleanup: true + file_glob: true + file: build/stage/**/*.tar.gz + on: + tags: true + condition: "$PUBLISH = 'On'" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ddf1d48927..c51c9ac1b40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased - Changes from 5.24.0 + - Build: + - CHANGED: Node binaries now use Github Releases for hosting [#6030](https://github.com/Project-OSRM/osrm-backend/pull/6030) - Misc: - FIXED: Upgrade to @mapbox/node-pre-gyp fix various bugs with Node 12/14 [#5991](https://github.com/Project-OSRM/osrm-backend/pull/5991) - FIXED: `valid` type in documentation examples [#5990](https://github.com/Project-OSRM/osrm-backend/issues/5990) diff --git a/docs/releasing.md b/docs/releasing.md index 9a492cd495f..d28374f9ed0 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -50,7 +50,8 @@ We may introduce forward-compatible changes: query parameters and response prope 7. Push tags and commits: `git push; git push --tags` 8. On https://github.com/Project-OSRM/osrm-backend/releases press `Draft a new release`, write the release tag `vx.y.z` in the `Tag version` field, write the changelog entries in the `Describe this release` field - and press `Publish release`. + and press `Publish release`. Note that Travis deployments will create a release when publishing node binaries, so the release + may already exist. In which case the description should be updated with the changelog entries. 9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release 10. Wait until the travis build has been completed and check if the node binaries were published by doing: `rm -rf node_modules && npm install` locally. diff --git a/package.json b/package.json index ac01b29272c..45405ac344c 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,8 @@ "binary": { "module_name": "node_osrm", "module_path": "./lib/binding/", - "host": "https://mapbox-node-binary.s3.amazonaws.com", - "remote_path": "./{name}/v{version}/{configuration}/", - "package_name": "{node_abi}-{platform}-{arch}.tar.gz" + "host": "https://github.com", + "remote_path": "./Project-OSRM/osrm-backend/releases/download/v{version}/", + "package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}-{configuration}.tar.gz" } } diff --git a/scripts/travis/publish.sh b/scripts/travis/node_package.sh similarity index 93% rename from scripts/travis/publish.sh rename to scripts/travis/node_package.sh index 35c6f95653a..fd62c8adb7e 100755 --- a/scripts/travis/publish.sh +++ b/scripts/travis/node_package.sh @@ -31,7 +31,7 @@ if [[ ${PUBLISH} == 'On' ]]; then fi fi - ./node_modules/.bin/node-pre-gyp package publish info $NPM_FLAGS + ./node_modules/.bin/node-pre-gyp package testpackage $NPM_FLAGS else echo "PUBLISH is set to '${PUBLISH}', skipping." fi