From b29882e64a53133a36edd70631dfb4d9ed834d60 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 12 May 2020 22:58:55 -0400 Subject: [PATCH] add GH action to upload to amazon Add action to publish on tags. Signed-off-by: Anas Nashif --- .github/workflows/publish.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..2266479 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,41 @@ +name: Build PR with Maven + +on: + push: + tags: + - '*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Checkout commits + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Upload build artifacts + uses: actions/upload-artifact@v1 + with: + name: zephyr_eclipse_p2_repo + path: maven/repository/target/repository + + - name: Upload to AWS S3 + run: | + echo "publish latest docs" + aws s3 sync --quiet maven/repository/target/repository s3://builds.zephyrproject.org/eclipse-plugin --delete