Skip to content

Commit 3c16e7b

Browse files
author
Akos Kitta
committed
split up to build and publish phase.
Signed-off-by: Akos Kitta <[email protected]>
1 parent ecb58f2 commit 3c16e7b

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,29 @@ 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+
publish:
59+
needs: build
60+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
61+
runs-on: ubuntu-latest
62+
uses: docker://plugins/s3
63+
steps:
64+
- name: Download [GitHub Actions]
65+
uses: actions/download-artifact@v2
66+
with:
67+
name: build-artifacts
68+
path: build-artifacts
69+
5870
- name: Publish Nightly [S3]
5971
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
60-
uses: docker://plugins/s3
6172
env:
62-
PLUGIN_SOURCE: "${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/*"
73+
PLUGIN_SOURCE: "build-artifacts/*"
6374
PLUGIN_TARGET: "/arduino-language-server/nightly"
64-
PLUGIN_STRIP_PREFIX: "${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/"
75+
PLUGIN_STRIP_PREFIX: "$build-artifacts/"
6576
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
6677
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
6778
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 commit comments

Comments
 (0)