handle 'unexpected end of JSON input' for settings file #22
This file contains hidden or 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: Branch Build and Upload to S3 | |
| on: | |
| push: | |
| branches: | |
| - "feat/windows-telemetry" | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.PREPROD_AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.PREPROD_AWS_SECRET_ACCESS_KEY }} | |
| AWS_S3_BUCKET: runners.warpbuilds.com | |
| AWS_S3_REGION: us-east-1 | |
| jobs: | |
| build-and-upload: | |
| runs-on: warp-ubuntu-latest-x64-16x | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| ref: ${{ github.ref }} | |
| - name: Set up Go | |
| uses: WarpBuilds/setup-go@v5 | |
| with: | |
| go-version: "1.21" # Replace with your Go version | |
| cache: true | |
| - name: Define S3 Path | |
| id: vars | |
| run: echo "s3_path=warpbuild-agentd/${GITHUB_REF_NAME}/" >> $GITHUB_ENV | |
| - name: Run GoReleaser (Snapshot) | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: "latest" | |
| args: release --snapshot --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: List all dist files | |
| run: ls -l dist | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v3 | |
| with: | |
| aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 # Set your AWS region | |
| - name: Sync to S3 | |
| run: | | |
| echo "Syncing to S3 bucket: ${{ env.AWS_S3_BUCKET }}" | |
| echo "Source directory: dist" | |
| echo "Destination directory: ${{ env.s3_path }}" | |
| echo "Region: ${{ env.AWS_S3_REGION }}" | |
| aws s3 sync dist s3://${{ env.AWS_S3_BUCKET }}/${{ env.s3_path }} --region ${{ env.AWS_S3_REGION }} --delete |