Skip to content

Release 0.14.10

Release 0.14.10 #23

Workflow file for this run

name: Release
on:
workflow_dispatch:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: thelang-io/setup-the@v1
- run: |
msg="${{ github.event.release.tag_name }}"
echo "VERSION=${msg:1}" >> $GITHUB_ENV
- run: the install
- run: the compile src/main --platform=linux && mv a.out cli-core-linux && sleep 1
- run: the compile src/main --platform=macos --arch=arm64 && mv a.out cli-core-macos-arm64 && sleep 1
- run: the compile src/main --platform=macos --arch=x86_64 && mv a.out cli-core-macos-x86_64 && sleep 1
- run: the compile src/main --platform=windows && mv a.out cli-core-windows && sleep 1
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET }}
aws-region: ${{ secrets.AWS_REGION }}
- run: aws s3 cp install.sh s3://${{ secrets.AWS_S3_BUCKET }}/cli --content-type text/plain --content-disposition "attachment;filename=the-install.sh"
- run: aws s3 cp install.sh s3://${{ secrets.AWS_S3_BUCKET }}/cli@latest --content-type text/plain --content-disposition "attachment;filename=the-install.sh"
- run: aws s3 cp install.sh s3://${{ secrets.AWS_S3_BUCKET }}/cli@$VERSION --content-type text/plain --content-disposition "attachment;filename=the-install.sh"
- run: aws s3 cp install.ps1 s3://${{ secrets.AWS_S3_BUCKET }}/cli-win --content-type text/plain --content-disposition "attachment;filename=the-install.ps1"
- run: aws s3 cp install.ps1 s3://${{ secrets.AWS_S3_BUCKET }}/cli-win@latest --content-type text/plain --content-disposition "attachment;filename=the-install.ps1"
- run: aws s3 cp install.ps1 s3://${{ secrets.AWS_S3_BUCKET }}/cli-win@$VERSION --content-type text/plain --content-disposition "attachment;filename=the-install.ps1"
- run: aws s3 cp cli-core-linux s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-linux --content-type application/octet-stream
- run: aws s3 cp cli-core-linux s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-linux@latest --content-type application/octet-stream
- run: aws s3 cp cli-core-linux s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-linux@$VERSION --content-type application/octet-stream
- run: aws s3 cp cli-core-macos-arm64 s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos-arm64 --content-type application/octet-stream
- run: aws s3 cp cli-core-macos-arm64 s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos-arm64@latest --content-type application/octet-stream
- run: aws s3 cp cli-core-macos-arm64 s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos-arm64@$VERSION --content-type application/octet-stream
- run: aws s3 cp cli-core-macos-x86_64 s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos-x86_64 --content-type application/octet-stream
- run: aws s3 cp cli-core-macos-x86_64 s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos-x86_64@latest --content-type application/octet-stream
- run: aws s3 cp cli-core-macos-x86_64 s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos-x86_64@$VERSION --content-type application/octet-stream
- run: aws s3 cp cli-core-windows s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-windows --content-type application/octet-stream
- run: aws s3 cp cli-core-windows s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-windows@latest --content-type application/octet-stream
- run: aws s3 cp cli-core-windows s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-windows@$VERSION --content-type application/octet-stream
- run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }} \
--paths "/cli" "/cli@latest" \
"/cli-win" "/cli-win@latest" \
"/cli-core-linux" "/cli-core-linux@latest" \
"/cli-core-macos-arm64" "/cli-core-macos-arm64@latest" \
"/cli-core-macos-x86_64" "/cli-core-macos-x86_64@latest" \
"/cli-core-windows" "/cli-core-windows@latest"