-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (73 loc) · 2.19 KB
/
release.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: podsync release
on:
pull_request:
push:
tags:
- 'v*.*.*'
branches:
- feat/gh-release
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
#permissions: write-all
permissions:
"contents": "write"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Setup Rust (armv7)
run: |
rustup target add armv7-unknown-linux-gnueabihf
sudo apt-get update
sudo apt-get install -y gcc-arm-linux-gnueabihf
#- name: Build x64
# uses: actions-rs/cargo@v1
# with:
# command: build
# args: --release --features backend-sql
- name: Build armv7
uses: actions-rs/cargo@v1
with:
command: build
args: >
--release
--features backend-sql
--target armv7-unknown-linux-gnueabihf
--profile armv7
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
- name: Upload x64 binary
id: upload-release-asset-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/podsync
asset_name: podsync-x64
asset_content_type: application/octet-stream
- name: Upload armv7 binary
id: upload-release-asset-armv7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/armv7-unknown-linux-gnueabihf/release/podsync
asset_name: podsync-armv7
asset_content_type: application/octet-stream