mirror of
https://github.com/emqx/neuron.git
synced 2026-10-28 14:07:20 +08:00
+29
-61
@@ -7,6 +7,11 @@ on:
|
||||
types:
|
||||
- published
|
||||
|
||||
env:
|
||||
VERSION: 2.3.0
|
||||
UI_VERSION: 2.2.3
|
||||
BRANCH: main
|
||||
|
||||
jobs:
|
||||
cross-build:
|
||||
runs-on: ubuntu-18.04
|
||||
@@ -19,14 +24,10 @@ jobs:
|
||||
container: neugates/build:${{ matrix.arch[1] }}-2.2
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: get version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::$(cat version)"
|
||||
|
||||
- name: compile
|
||||
run: |
|
||||
mkdir -p build && cd build
|
||||
@@ -34,15 +35,11 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=Release -DDISABLE_UT=ON
|
||||
make -j4
|
||||
|
||||
- name: get ui version
|
||||
id: get_ui_version
|
||||
run: echo "::set-output name=version::$(cat ui_version)"
|
||||
|
||||
- name: fetch dashboard
|
||||
uses: dsaltares/fetch-gh-release-asset@master
|
||||
with:
|
||||
repo: "emqx/neuron-dashboard-src"
|
||||
version: "tags/${{ steps.get_ui_version.outputs.version }}"
|
||||
version: "tags/${{ env.UI_VERSION }}"
|
||||
file: "neuron-dashboard.zip"
|
||||
target: "neuron-dashboard.zip"
|
||||
|
||||
@@ -52,7 +49,7 @@ jobs:
|
||||
|
||||
- name: Create neuron sdk package
|
||||
run: |
|
||||
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-${{ steps.get_version.outputs.version }}
|
||||
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-$VERSION
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -71,17 +68,13 @@ jobs:
|
||||
container: neugates/build_old:${{ matrix.arch[1] }}-2.2
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: troydhanson/uthash
|
||||
path: extern/uthash
|
||||
|
||||
- name: get version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::$(cat version)"
|
||||
|
||||
- name: compile
|
||||
run: |
|
||||
mkdir -p build && cd build
|
||||
@@ -89,15 +82,11 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=Release -DDISABLE_UT=ON
|
||||
make -j4
|
||||
|
||||
- name: get ui version
|
||||
id: get_ui_version
|
||||
run: echo "::set-output name=version::$(cat ui_version)"
|
||||
|
||||
- name: fetch dashboard
|
||||
uses: dsaltares/fetch-gh-release-asset@master
|
||||
with:
|
||||
repo: "emqx/neuron-dashboard-src"
|
||||
version: "tags/${{ steps.get_ui_version.outputs.version }}"
|
||||
version: "tags/${{ env.UI_VERSION }}"
|
||||
file: "neuron-dashboard.zip"
|
||||
target: "neuron-dashboard.zip"
|
||||
|
||||
@@ -107,7 +96,7 @@ jobs:
|
||||
|
||||
- name: Create neuron sdk package
|
||||
run: |
|
||||
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-old-${{ steps.get_version.outputs.version }}
|
||||
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-old-$VERSION
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -124,14 +113,10 @@ jobs:
|
||||
container: neugates/build:${{ matrix.arch[1] }}-2.2
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: get version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::$(cat version)"
|
||||
|
||||
- name: compile
|
||||
run: |
|
||||
mkdir -p build && cd build
|
||||
@@ -141,7 +126,7 @@ jobs:
|
||||
|
||||
- name: Create neuron sdk package
|
||||
run: |
|
||||
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-debug-${{ steps.get_version.outputs.version }}
|
||||
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-debug-$VERSION
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -155,16 +140,11 @@ jobs:
|
||||
needs: [cross-build, build-debug-sdk]
|
||||
|
||||
steps:
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
id: extract_branch
|
||||
|
||||
- name: delete old daily-pre-release
|
||||
uses: dev-drprasad/delete-tag-and-release@v0.2.0
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: ${{ steps.extract_branch.outputs.branch }}-daily
|
||||
tag_name: ${{ env.BRANCH }}-daily
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -174,8 +154,8 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.extract_branch.outputs.branch }}-daily
|
||||
release_name: Daily Release(${{ steps.extract_branch.outputs.branch }})
|
||||
tag_name: ${{ env.BRANCH }}-daily
|
||||
release_name: Daily Release(${{ env.BRANCH }})
|
||||
draft: false
|
||||
prerelease: true
|
||||
|
||||
@@ -199,14 +179,10 @@ jobs:
|
||||
package: [tar.gz]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: get version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::$(cat version)"
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: release_url
|
||||
@@ -214,14 +190,14 @@ jobs:
|
||||
- id: release_url
|
||||
run: |
|
||||
value=`cat release_url.txt`
|
||||
echo "::set-output name=name::$value"
|
||||
echo "name=$value" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.type }}-${{ matrix.arch }}
|
||||
|
||||
- id: package
|
||||
run: echo "::set-output name=name::${{ matrix.type }}-${{ steps.get_version.outputs.version }}-${{ matrix.arch }}.${{ matrix.package }}"
|
||||
run: echo "name=${{ matrix.type }}-${{ env.VERSION }}-${{ matrix.arch }}.${{ matrix.package }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload daily release asset
|
||||
id: upload-release-asset
|
||||
@@ -231,7 +207,7 @@ jobs:
|
||||
with:
|
||||
upload_url: ${{ steps.release_url.outputs.name }}
|
||||
asset_path: ./${{ steps.package.outputs.name }}
|
||||
asset_name: ${{ matrix.type }}-${{ steps.get_version.outputs.version }}-daily-linux-${{ matrix.arch }}.${{ matrix.package }}
|
||||
asset_name: ${{ matrix.type }}-${{ env.VERSION }}-daily-linux-${{ matrix.arch }}.${{ matrix.package }}
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
upload_daily_release_debug_asset:
|
||||
@@ -245,14 +221,10 @@ jobs:
|
||||
package: [tar.gz]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: get version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::$(cat version)"
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: release_url
|
||||
@@ -260,14 +232,14 @@ jobs:
|
||||
- id: release_url
|
||||
run: |
|
||||
value=`cat release_url.txt`
|
||||
echo "::set-output name=name::$value"
|
||||
echo "name=$value" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.type }}-${{ matrix.arch }}
|
||||
|
||||
- id: package
|
||||
run: echo "::set-output name=name::${{ matrix.type }}-${{ steps.get_version.outputs.version }}-${{ matrix.arch }}.${{ matrix.package }}"
|
||||
run: echo "name=${{ matrix.type }}-${{ env.VERSION }}-${{ matrix.arch }}.${{ matrix.package }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload daily release asset
|
||||
id: upload-release-asset
|
||||
@@ -277,7 +249,7 @@ jobs:
|
||||
with:
|
||||
upload_url: ${{ steps.release_url.outputs.name }}
|
||||
asset_path: ./${{ steps.package.outputs.name }}
|
||||
asset_name: ${{ matrix.type }}-${{ steps.get_version.outputs.version }}-daily-linux-${{ matrix.arch }}.${{ matrix.package }}
|
||||
asset_name: ${{ matrix.type }}-${{ env.VERSION }}-daily-linux-${{ matrix.arch }}.${{ matrix.package }}
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
clean:
|
||||
@@ -299,20 +271,16 @@ jobs:
|
||||
package: [tar.gz]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: get version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::$(cat version)"
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.type }}-${{ matrix.arch }}
|
||||
|
||||
- id: package
|
||||
run: echo "::set-output name=name::${{ matrix.type }}-${{ steps.get_version.outputs.version }}-${{ matrix.arch }}.${{ matrix.package }}"
|
||||
run: echo "name=${{ matrix.type }}-${{ env.VERSION }}-${{ matrix.arch }}.${{ matrix.package }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: gen packages sha256
|
||||
run: sudo bash -c "echo $(sha256sum ./${{ steps.package.outputs.name }} | awk '{print $1}') > ./${{ steps.package.outputs.name }}.sha256"
|
||||
@@ -324,7 +292,7 @@ jobs:
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./${{ steps.package.outputs.name}}.sha256
|
||||
asset_name: ${{ matrix.type }}-${{ steps.get_version.outputs.version }}-linux-${{ matrix.arch }}.${{ matrix.package }}.sha256
|
||||
asset_name: ${{ matrix.type }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.${{ matrix.package }}.sha256
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
@@ -334,5 +302,5 @@ jobs:
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./${{ steps.package.outputs.name}}
|
||||
asset_name: ${{ matrix.type }}-${{ steps.get_version.outputs.version }}-linux-${{ matrix.arch }}.${{ matrix.package }}
|
||||
asset_name: ${{ matrix.type }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.${{ matrix.package }}
|
||||
asset_content_type: application/octet-stream
|
||||
@@ -1 +0,0 @@
|
||||
2.1.2
|
||||
Reference in New Issue
Block a user