From 9fabb602bf31480570fa5d5ea7a55ba1a47cc133 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Tue, 11 Feb 2020 22:37:24 -0600 Subject: [PATCH] Testing github action workflow (#454) Build and upload linux/mac binaries to S3 (unofficial releases) --- .github/workflows/artifacts.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/artifacts.yml diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml new file mode 100644 index 0000000..b427354 --- /dev/null +++ b/.github/workflows/artifacts.yml @@ -0,0 +1,33 @@ +name: Upload binaries to S3 + +on: + push: + branches: + - master + pull_request: + branches: + - '*' + +jobs: + run-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Make binaries + uses: sosedoff/actions/golang-build@master + with: + args: linux/amd64 darwin/amd64 + env: + COMPRESS_FILES: 1 + + - name: Upload to Amazon S3 + uses: ItsKarma/aws-cli@v1.70.0 + with: + args: s3 cp --acl public-read --recursive --exclude '*' --include '*' /github/workspace/.release/ s3://pgweb-github-builds/${{ github.base_ref || github.ref }}/ + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + \ No newline at end of file