Download latest libs from CRAN #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'Tag a release' | |
type: boolean | |
required: false | |
default: false | |
name: Download latest libs from CRAN | |
jobs: | |
Build: | |
# OS matters because we copy 'cmake' and 'zstd' binaries from homebrew | |
runs-on: macos-12 | |
steps: | |
- name: Prepare git | |
run: | | |
git config --global user.email '74155986+r-universe[bot]@users.noreply.github.com' | |
git config --global user.name 'r-universe[bot]' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download libraries | |
run: ./.github/workflows/download.sh | |
- name: Push binaries | |
run: | | |
arch=$(uname -m) | |
git add opt files.log | |
git commit -m "Update at $(date +%F)" || exit 0 | |
git push origin | |
- name: Create xz and zstd bundles | |
id: bundles | |
run: | | |
mkdir assets | |
arch=$(uname -m) | |
tar cfJ assets/cranlibs-${arch}.tar.xz opt | |
gtar -I 'zstd --ultra -22' -cf assets/cranlibs-${arch}.tar.zst opt | |
echo "date=$(date +%F)" >> $GITHUB_OUTPUT | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: cranlibs | |
# path: assets | |
- name: Release | |
if: ${{ github.event.inputs.release == 'true' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.bundles.outputs.date }} | |
files: assets/* |