-
Notifications
You must be signed in to change notification settings - Fork 450
40 lines (38 loc) · 1.33 KB
/
build_packages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: build packages
on:
pull_request:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: build
run: |
docker run --rm -i \
-v ${PWD}:/project \
electronuserland/builder:16-wine \
bash -c "yarn && yarn electron:build-linux && yarn electron:build-win"
- uses: aws-actions/configure-aws-credentials@v2
if: github.event_name == 'release'
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: upload release asset
if: github.event_name == 'release'
run: |
cd dist_electron
tag=$(echo ${{ github.ref }} | sed -r "s ^refs/heads/|^refs/tags/(.*) \1 g")
for var in $(ls); do
$GITHUB_WORKSPACE/.github/workflows/upload_github_release_asset.sh \
owner=${{ github.repository_owner }} \
repo=mqttx \
tag=$tag \
filename=$var \
github_api_token=$(echo ${{ secrets.GITHUB_TOKEN }});
done
cd ..
aws s3 cp --recursive dist_electron s3://${{ secrets.AWS_S3_BUCKET }}/MQTTX/$tag/