Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Commit 1c8751e

Browse files
committed
push every built binary to bin.zetz.io
github artifacts dont have a way to autoamtically download them, ugh
1 parent e5564a6 commit 1c8751e

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ jobs:
1717
matrix:
1818
os: [macos-latest, windows-latest, ubuntu-latest]
1919

20-
21-
2220
defaults:
2321
run:
2422
shell: bash
2523

2624
steps:
2725
- uses: actions/checkout@v2
2826

27+
- name: Prepare Artifact
28+
run: |
29+
7z a artifact.zip modules/
30+
2931
- name: macos
3032
if: matrix.os == 'macos-latest'
3133
run: |
@@ -48,12 +50,26 @@ jobs:
4850
export "ZZ_ASAN=false"
4951
./ci.sh
5052
51-
- uses: actions/upload-artifact@v2
52-
with:
53-
name: zz-${{ matrix.os }}
54-
path: |
55-
target/release/zz*
56-
modules/
57-
!modules/**/target
53+
- name: Upload Release Asset
54+
if: github.ref == 'refs/heads/master'
55+
env:
56+
FILE: ./.zip
57+
AWS_REGION: 'eu-west-1'
58+
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
59+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
60+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
61+
GITHUB_OS: ${{matrix.os}}
62+
run: |
63+
mkdir -p ~/.aws
64+
echo "[default]" > ~/.aws/credentials
65+
echo "aws_access_key_id = ${AWS_ACCESS_KEY_ID}" >> ~/.aws/credentials
66+
echo "aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY}" >> ~/.aws/credentials
67+
68+
7z a artifact.zip target/release/zz*
69+
export BNAME="zz-${GITHUB_RUN_NUMBER}-${GITHUB_SHA}-${GITHUB_OS%-latest}.zip"
70+
aws s3 cp artifact.zip s3://${S3_BUCKET}/${BNAME} --region ${AWS_REGION} --acl public-read
71+
export BNAME="zz-master-${GITHUB_OS%-latest}.zip"
72+
aws s3 cp artifact.zip s3://${S3_BUCKET}/${BNAME} --region ${AWS_REGION} --acl public-read
73+
5874
5975

0 commit comments

Comments
 (0)