Release 0.13.2 #8
Workflow file for this run
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
name: Release | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
release: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: thelang-io/setup-the@v1 | |
- run: | | |
msg="${{ github.event.release.tag_name }}" | |
echo "VERSION=${msg:1}" >> $GITHUB_ENV | |
- run: the build src | |
- run: the compile build/result --platform=linux && mv a.out cli-core-linux && sleep 1 | |
- run: the compile build/result --platform=macos && mv a.out cli-core-macos && sleep 1 | |
- run: the compile build/result --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 s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos --content-type application/octet-stream | |
- run: aws s3 cp cli-core-macos s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos@latest --content-type application/octet-stream | |
- run: aws s3 cp cli-core-macos s3://${{ secrets.AWS_S3_BUCKET }}/cli-core-macos@$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" "/cli-core-macos@latest" \ | |
"/cli-core-windows" "/cli-core-windows@latest" |