-
Notifications
You must be signed in to change notification settings - Fork 3
83 lines (72 loc) · 2.5 KB
/
libxp2p_linux.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
name: Linux XP2P CI
on:
push:
paths-ignore: # 有時候不想要改個文档也触发 github actions
- '**.md'
- 'LICENSE'
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.17.0'
- name: Use cmake
run: echo +++++$(cmake --version)
- name: build libenet
if: startsWith(github.event.ref, 'refs/heads')
run: |
ldd --version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
export GIT_BRANCH_IMAGE_VERSION=$VERSION
sh .github/script/build_enet_linux.sh Debug
env:
GIT_ACCESS_TOKEN: ${{ secrets.IOT_GITHUB_ACCESS_TOKEN }}
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
- name: push libenet
if: startsWith(github.event.ref, 'refs/tags')
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
export GIT_BRANCH_IMAGE_VERSION=$VERSION
sh .github/script/build_enet_linux.sh Release
env:
GIT_ACCESS_TOKEN: ${{ secrets.IOT_GITHUB_ACCESS_TOKEN }}
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
- name: Compress SDK Artifacts
run: |
zip -r xp2p_linux.zip iot-p2p/iot/link/pc_app/p2p_sample
- name: Upload LinuxSDK Library
if: startsWith(github.event.ref, 'refs/heads')
uses: actions/upload-artifact@v4
with:
name: xp2p_linux_lib.zip
path: xp2p_linux.zip
# - name: Create Release
# id: create_release
# if: startsWith(github.event.ref, 'refs/tags')
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# this is a auto beta release
# - First Change
# - Second Change
# draft: false
# prerelease: true
- name: Upload binaries to release
if: startsWith(github.event.ref, 'refs/tags')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: xp2p_linux.zip
asset_name: xp2p_linux.zip
tag: ${{ github.ref }}
overwrite: true