Skip to content

Fixed the S3 upload for the nightlies #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 25, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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 <kittaakos@typefox.io>
  • Loading branch information
Akos Kitta committed Aug 24, 2020
commit 5b9966fcf8c77442cbe6208c0b2b49b973c7584b
29 changes: 20 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,28 @@ jobs:
- name: Upload Workflow Artifact [GitHub Actions]
uses: actions/upload-artifact@v2
with:
name: binary_${{ runner.OS }}
name: build-artifacts
# this makes the artifact a .zip of the .zip archive, which is currently necessary to preserve the executable file permissions
# see: https://github.com/actions/upload-artifact/issues/38
path: ${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/${{ env.EXECUTABLE_NAME }}_${{ runner.OS }}_amd64.zip

- name: Publish Nightly [S3]
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: kittaakos/upload-s3-action@v0.0.1
publish:
needs: build
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Download Workflow Artifact [GitHub Actions]
uses: actions/download-artifact@v2
with:
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: arduino-downloads-prod-beagle
source_dir: ${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/${{ env.EXECUTABLE_NAME }}_${{ runner.OS }}_amd64.zip
destination_dir: arduino-language-server/nightly/
name: build-artifacts
path: build-artifacts

- name: Publish Nightly [S3]
uses: docker://plugins/s3
env:
PLUGIN_SOURCE: "build-artifacts/*"
PLUGIN_TARGET: "/arduino-language-server/nightly"
PLUGIN_STRIP_PREFIX: "build-artifacts/"
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}