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: Publish Install Scripts | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '3.1.x' | |
| - name: Compile .NET Core init DLL | |
| run: ./build.sh | |
| working-directory: scripts/netcore | |
| - uses: actions/setup-java@v1 | |
| with: | |
| java-version: '10' | |
| - name: Compile Java init JAR | |
| run: ./build.sh | |
| working-directory: scripts/java | |
| - uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.ARTIFACT_AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.ARTIFACT_AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Deploy to S3 | |
| run: aws s3 sync --delete --exclude="$PWD/*/*" ./ s3://tunshell-init/ --acl=public-read --cache-control max-age=7200 --metadata-directive REPLACE | |
| working-directory: scripts | |
| - name: Invalidate CloudFront | |
| run: aws cloudfront create-invalidation --distribution-id=E2JEG1NKANF1OH --paths '/*' |