2022-06-01 10:23:53 +03:00
|
|
|
name: tarballs
|
2022-06-01 09:53:32 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
release: null
|
|
|
|
push:
|
|
|
|
tags: ['*']
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
upload:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- { os: ubuntu-latest, system: x86_64-linux }
|
|
|
|
- { os: macos-latest, system: x86_64-darwin }
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: cachix/install-nix-action@v16
|
|
|
|
- uses: cachix/cachix-action@v10
|
|
|
|
with:
|
|
|
|
name: ${{ secrets.CACHIX_NAME }}
|
|
|
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
|
|
|
2023-01-03 21:24:54 +03:00
|
|
|
- uses: google-github-actions/setup-gcloud@v0.2.0
|
2022-06-01 09:53:32 +03:00
|
|
|
with:
|
2023-01-03 21:24:54 +03:00
|
|
|
version: '290.0.1'
|
|
|
|
service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
|
2022-06-01 09:53:32 +03:00
|
|
|
project_id: ${{ secrets.GCS_PROJECT }}
|
2023-01-03 21:24:54 +03:00
|
|
|
export_default_credentials: true
|
2022-06-01 09:53:32 +03:00
|
|
|
|
|
|
|
- run: nix-build -A tarball --arg enableStatic true
|
|
|
|
|
|
|
|
- name: Run upload to bootstrap.urbit.org
|
|
|
|
run: |
|
|
|
|
version="$(cat ./pkg/urbit/version)"
|
|
|
|
system="$(nix-instantiate --eval --expr 'builtins.currentSystem')"
|
|
|
|
system=${system:1:${#system}-2}
|
|
|
|
target="gs://bootstrap.urbit.org/ci/urbit-v${version}-${system}-${GITHUB_SHA:0:9}.tgz"
|
|
|
|
|
|
|
|
gsutil cp -n ./result "$target"
|
|
|
|
|
|
|
|
echo "upload to $target complete."
|