|
93 | 93 | pattern: build/stage/**/argon2*.tar.gz
|
94 | 94 | github-token: ${{ secrets.GITHUB_TOKEN }}
|
95 | 95 | release-url: ${{ github.event.release.upload_url }}
|
| 96 | + |
| 97 | + build-arm: |
| 98 | + name: Build on arm64 |
| 99 | + runs-on: ubuntu-latest |
| 100 | + env: |
| 101 | + npm_config_build_from_source: true |
| 102 | + strategy: |
| 103 | + matrix: |
| 104 | + include: |
| 105 | + - arch: aarch64 |
| 106 | + distro: ubuntu18.04 |
| 107 | + - arch: aarch64 |
| 108 | + distro: alpine_latest |
| 109 | + |
| 110 | + steps: |
| 111 | + - name: Checkout |
| 112 | + uses: actions/checkout@v1 |
| 113 | + with: |
| 114 | + submodules: true |
| 115 | + |
| 116 | + |
| 117 | + name: Package artifacts |
| 118 | + id: build |
| 119 | + with: |
| 120 | + arch: ${{ matrix.arch }} |
| 121 | + distro: ${{ matrix.distro }} |
| 122 | + setup: mkdir -p "${PWD}/artifacts" |
| 123 | + dockerRunArgs: --volume "${PWD}:/repo" |
| 124 | + env: | |
| 125 | + npm_config_build_from_source: true |
| 126 | + install: | |
| 127 | + case "${{ matrix.distro }}" in |
| 128 | + ubuntu*|jessie|stretch|buster) |
| 129 | + apt-get update -y |
| 130 | + apt-get install -y curl |
| 131 | + curl -fsSL https://deb.nodesource.com/setup_12.x | bash - |
| 132 | + apt-get install -y make g++ python nodejs |
| 133 | + npm install --global yarn |
| 134 | + ;; |
| 135 | + alpine*) |
| 136 | + apk add --update make g++ python3 |
| 137 | + apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.12/main/ nodejs~=12 npm~=12 |
| 138 | + npm install --global yarn |
| 139 | + ;; |
| 140 | + esac |
| 141 | + run: | |
| 142 | + cd /repo |
| 143 | + yarn install --frozen-lockfile |
| 144 | + yarn node-pre-gyp package |
| 145 | +
|
| 146 | + - name: Upload to Release |
| 147 | + uses: csexton/release-asset-action@v2 |
| 148 | + with: |
| 149 | + pattern: build/stage/**/argon2*.tar.gz |
| 150 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 151 | + release-url: ${{ github.event.release.upload_url }} |
0 commit comments