2020-05-07 12:06:55 +08:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2020-05-08 08:44:32 +08:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2020-05-07 12:06:55 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-05-08 08:44:32 +08:00
|
|
|
- name: Run ./ci/steps/test.sh
|
|
|
|
uses: ./ci/container
|
|
|
|
with:
|
|
|
|
args: ./ci/steps/test.sh
|
|
|
|
|
2020-05-08 11:48:49 +08:00
|
|
|
release:
|
2020-05-08 08:44:32 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run ./ci/steps/release.sh
|
|
|
|
uses: ./ci/container
|
|
|
|
with:
|
|
|
|
args: ./ci/steps/release.sh
|
|
|
|
- name: Upload npm package artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: npm-package
|
|
|
|
path: ./release
|
|
|
|
|
2020-05-08 11:48:49 +08:00
|
|
|
linux-amd64:
|
|
|
|
needs: release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Download npm package
|
2020-05-08 12:34:20 +08:00
|
|
|
uses: actions/download-artifact@v2
|
2020-05-08 11:48:49 +08:00
|
|
|
with:
|
|
|
|
name: npm-package
|
2020-05-08 12:34:20 +08:00
|
|
|
path: ./release
|
|
|
|
- name: Run ./ci/steps/release-static.sh
|
2020-05-08 11:48:49 +08:00
|
|
|
uses: ./ci/container
|
|
|
|
with:
|
2020-05-08 12:34:20 +08:00
|
|
|
args: ./ci/steps/release-static.sh
|
2020-05-08 11:48:49 +08:00
|
|
|
- name: Upload release artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-05-08 12:34:20 +08:00
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|
2020-05-08 11:48:49 +08:00
|
|
|
|
2020-05-08 08:44:32 +08:00
|
|
|
linux-arm64:
|
2020-05-08 11:48:49 +08:00
|
|
|
needs: release
|
2020-05-08 08:44:32 +08:00
|
|
|
runs-on: ubuntu-arm64-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-05-08 11:48:49 +08:00
|
|
|
- name: Download npm package
|
2020-05-08 12:34:20 +08:00
|
|
|
uses: actions/download-artifact@v2
|
2020-05-08 11:48:49 +08:00
|
|
|
with:
|
|
|
|
name: npm-package
|
2020-05-08 12:34:20 +08:00
|
|
|
path: ./release
|
|
|
|
- name: Run ./ci/steps/release-static.sh
|
2020-05-08 08:44:32 +08:00
|
|
|
uses: ./ci/container
|
|
|
|
with:
|
2020-05-08 12:34:20 +08:00
|
|
|
args: ./ci/steps/release-static.sh
|
2020-05-08 08:44:32 +08:00
|
|
|
- name: Upload release artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-05-08 12:34:20 +08:00
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|
2020-05-08 08:44:32 +08:00
|
|
|
|
2020-05-08 13:42:46 +08:00
|
|
|
macos-amd64:
|
2020-05-08 11:48:49 +08:00
|
|
|
needs: release
|
2020-05-08 08:44:32 +08:00
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-05-08 11:48:49 +08:00
|
|
|
- name: Download npm package
|
2020-05-08 12:34:20 +08:00
|
|
|
uses: actions/download-artifact@v2
|
2020-05-08 11:48:49 +08:00
|
|
|
with:
|
|
|
|
name: npm-package
|
2020-05-08 12:34:20 +08:00
|
|
|
path: ./release
|
2020-05-08 08:44:32 +08:00
|
|
|
- run: brew unlink node@12
|
|
|
|
- run: brew install node
|
2020-05-08 12:34:20 +08:00
|
|
|
- run: ./ci/steps/release-static.sh
|
2020-05-08 08:44:32 +08:00
|
|
|
env:
|
2020-05-08 11:48:49 +08:00
|
|
|
# Otherwise we get rate limited when fetching the ripgrep binary.
|
2020-05-09 04:31:42 +08:00
|
|
|
# For whatever reason only MacOS needs it.
|
2020-05-08 15:08:30 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-05-08 08:44:32 +08:00
|
|
|
- name: Upload release artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
2020-05-07 12:06:55 +08:00
|
|
|
with:
|
2020-05-08 12:34:20 +08:00
|
|
|
name: release-packages
|
|
|
|
path: ./release-packages
|