Skip to content

Commit 5b9966f

Browse files
author
Akos Kitta
committed
Use 'docker://plugins/s3' for the S3 upload
Made the S3 'publish' job dependent on the 'build' jobs. From now on, the upload happens when the build was green on each platform. Signed-off-by: Akos Kitta <[email protected]>
1 parent 14711f5 commit 5b9966f

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

Diff for: .github/workflows/build.yml

+20-9
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,28 @@ jobs:
5050
- name: Upload Workflow Artifact [GitHub Actions]
5151
uses: actions/upload-artifact@v2
5252
with:
53-
name: binary_${{ runner.OS }}
53+
name: build-artifacts
5454
# this makes the artifact a .zip of the .zip archive, which is currently necessary to preserve the executable file permissions
5555
# see: https://github.com/actions/upload-artifact/issues/38
5656
path: ${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/${{ env.EXECUTABLE_NAME }}_${{ runner.OS }}_amd64.zip
5757

58-
- name: Publish Nightly [S3]
59-
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
60-
uses: kittaakos/[email protected]
58+
publish:
59+
needs: build
60+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Download Workflow Artifact [GitHub Actions]
64+
uses: actions/download-artifact@v2
6165
with:
62-
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
63-
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
64-
aws_bucket: arduino-downloads-prod-beagle
65-
source_dir: ${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/${{ env.EXECUTABLE_NAME }}_${{ runner.OS }}_amd64.zip
66-
destination_dir: arduino-language-server/nightly/
66+
name: build-artifacts
67+
path: build-artifacts
68+
69+
- name: Publish Nightly [S3]
70+
uses: docker://plugins/s3
71+
env:
72+
PLUGIN_SOURCE: "build-artifacts/*"
73+
PLUGIN_TARGET: "/arduino-language-server/nightly"
74+
PLUGIN_STRIP_PREFIX: "build-artifacts/"
75+
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
76+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
77+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 commit comments

Comments
 (0)