From 43c0d7bed1d307ad74359c2b92109342a030a546 Mon Sep 17 00:00:00 2001 From: Bao Zhiyuan Date: Tue, 8 Oct 2024 18:22:34 +0800 Subject: [PATCH 1/2] add bleeding release to linux --- .github/workflows/cd.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 71b7e1d7..f708d0c5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -91,7 +91,7 @@ jobs: steps: - name: Install dependencies run: | - apt update && apt install -y software-properties-common curl unzip build-essential git sudo + apt update && apt install -y software-properties-common curl unzip build-essential git sudo sha256sum - name: Checkout run: | @@ -136,3 +136,21 @@ jobs: aws s3 cp target/release/moon "s3://${{ secrets.AWS_BUCKET_NAME }}/bleeding-moon/$version/$(uname -s)-$(uname -m)/" aws s3 cp target/release/moonrun "s3://${{ secrets.AWS_BUCKET_NAME }}/bleeding-moonrun/$version/$(uname -s)-$(uname -m)/" aws s3 cp target/release/moonrun "s3://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/" + + - name: Bleeding Release + 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 && sha256sum -- * >../moonbit-linux-x86_64.sha256 && popd + tar czf ./moonbit-linux-x86_64.tar.gz --directory=./tmp-bins . + aws s3 cp ./moonbit-linux-x86_64.tar.gz s3://cli.moonbitlang.com/binaries/bleeding/moonbit-linux-x86_64.tar.gz + aws s3 cp ./moonbit-linux-x86_64.sha256 s3://cli.moonbitlang.com/binaries/bleeding/moonbit-linux-x86_64.sha256 + aws cloudfront create-invalidation --distribution-id E1KQYZEVEB0TAY --paths "/*" From c9d8bc1a7f1a8632b30f514d3d504d47bb3b0440 Mon Sep 17 00:00:00 2001 From: Bao Zhiyuan Date: Tue, 8 Oct 2024 18:25:29 +0800 Subject: [PATCH 2/2] install sha256sum --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index f708d0c5..9ad89412 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -91,7 +91,7 @@ jobs: steps: - name: Install dependencies run: | - apt update && apt install -y software-properties-common curl unzip build-essential git sudo sha256sum + apt update && apt install -y software-properties-common curl unzip build-essential git sudo coreutils - name: Checkout run: |