File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 2626
2727 name : ${{ matrix.os }}-${{ matrix.tests }}-${{ matrix.cpu }}-${{ matrix.nim_version }}-${{ matrix.job_number }}
2828 runs-on : ${{ matrix.builder }}
29- timeout-minutes : 60
29+ timeout-minutes : 90
3030 steps :
3131 - name : Checkout sources
3232 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v*.*.*'
7+ branches :
8+ - master
79 workflow_dispatch :
810
911env :
@@ -170,6 +172,33 @@ jobs:
170172 path : /tmp/release/
171173 retention-days : 30
172174
175+ - name : Release - Upload to the cloud
176+ env :
177+ s3_endpoint : ${{ secrets.S3_ENDPOINT }}
178+ s3_bucket : ${{ secrets.S3_BUCKET }}
179+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
180+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
181+ AWS_DEFAULT_REGION : ${{ secrets.AWS_DEFAULT_REGION }}
182+ run : |
183+ # Variables
184+ branch="${GITHUB_REF_NAME/\//-}"
185+ folder="/tmp/release"
186+
187+ # Tagged releases
188+ if [[ "${{ github.ref }}" == *"refs/tags/"* ]]; then
189+ aws s3 cp --recursive "${folder}" s3://${{ env.s3_bucket }}/releases/${branch} --endpoint-url ${{ env.s3_endpoint }}
190+ echo "${branch}" > "${folder}"/latest
191+ aws s3 cp "${folder}"/latest s3://${{ env.s3_bucket }}/releases/latest --endpoint-url ${{ env.s3_endpoint }}
192+
193+ # master branch
194+ elif [[ "${branch}" == "${{ github.event.repository.default_branch }}" ]]; then
195+ aws s3 cp --recursive "${folder}" s3://${{ env.s3_bucket }}/${branch} --endpoint-url ${{ env.s3_endpoint }}
196+
197+ # Custom branch
198+ else
199+ aws s3 cp --recursive "${folder}" s3://${{ env.s3_bucket }}/branches/${branch} --endpoint-url ${{ env.s3_endpoint }}
200+ fi
201+
173202 - name : Release
174203 uses : softprops/action-gh-release@v2
175204 if : startsWith(github.ref, 'refs/tags/')
You can’t perform that action at this time.
0 commit comments