Skip to content

Bleeding Release

Bleeding Release #8

# moon: The build system and package manager for MoonBit.
# Copyright (C) 2024 International Digital Economy Academy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# For inquiries, you can contact us via e-mail at [email protected].
name: Bleeding Release Mac
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- name: Cargo cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
path: ~/.cargo/registry
- name: Build
run: cargo build --release
- name: Bleeding Release (macos-latest)
if: ${{ matrix.os == 'macos-latest' }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
run: |
rm -rf tmp-bins
mkdir tmp-bins
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m).tar.gz --output moonbit.tar.gz
tar xf moonbit.tar.gz --directory ./tmp-bins/
cp -L ./target/release/moonrun ./tmp-bins/
cp -L ./target/release/moon ./tmp-bins/
pushd tmp-bins && shasum -a 256 -- * >../moonbit-darwin-aarch64.sha256 && popd
tar czf ./moonbit-darwin-aarch64.tar.gz --directory=./tmp-bins .
aws s3 cp ./moonbit-darwin-aarch64.tar.gz s3://cli.moonbitlang.com/binaries/bleeding/moonbit-darwin-aarch64.tar.gz
aws s3 cp ./moonbit-darwin-aarch64.sha256 s3://cli.moonbitlang.com/binaries/bleeding/moonbit-darwin-aarch64.sha256
aws cloudfront create-invalidation --distribution-id E1KQYZEVEB0TAY --paths "/*"