mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
ci: rename daily release package
This commit is contained in:
+32
-14
@@ -52,16 +52,19 @@ jobs:
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/${{ matrix.arch[0] }}.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release -DDISABLE_UT=ON
|
||||
make -j4
|
||||
- name: get version
|
||||
id: get_version
|
||||
run: echo "::set-output name=version::$(cat version)"
|
||||
|
||||
- name: Create neuron package
|
||||
env:
|
||||
ARCH: ${{ matrix.arch[5] }}
|
||||
run: |
|
||||
./package.sh -p ${ARCH} -n neuron-2.${GITHUB_REF##*/}
|
||||
./package.sh -p ${ARCH} -n neuron-${{ steps.get_version.outputs.version }}
|
||||
cd package
|
||||
python3 create_neuron_deb.py 2.${GITHUB_REF##*/} ${{ matrix.arch[5] }}
|
||||
python3 create_neuron_deb.py ${{ steps.get_version.outputs.version }} ${{ matrix.arch[5] }}
|
||||
sudo alien --scripts -k -r *.deb
|
||||
mv *.rpm neuron-2.${GITHUB_REF##*/}-${{ matrix.arch[5] }}.rpm
|
||||
mv *.rpm neuron-${{ steps.get_version.outputs.version }}-${{ matrix.arch[5] }}.rpm
|
||||
mv *.rpm ../
|
||||
mv *.deb ../
|
||||
|
||||
@@ -75,11 +78,11 @@ jobs:
|
||||
|
||||
- name: Create neuron sdk package
|
||||
run: |
|
||||
./package-sdk.sh -p ${{ matrix.arch[5] }} -n neuron-sdk-2.${GITHUB_REF##*/}
|
||||
./package-sdk.sh -p ${{ matrix.arch[5] }} -n neuron-sdk-${{ steps.get_version.outputs.version }}
|
||||
cd package
|
||||
python3 create_neuron_sdk_deb.py 2.${GITHUB_REF##*/} ${{ matrix.arch[5] }}
|
||||
python3 create_neuron_sdk_deb.py ${{ steps.get_version.outputs.version }} ${{ matrix.arch[5] }}
|
||||
sudo alien --scripts -k -r *.deb
|
||||
mv *.rpm neuron-sdk-2.${GITHUB_REF##*/}-${{ matrix.arch[5] }}.rpm
|
||||
mv *.rpm neuron-sdk-${{ steps.get_version.outputs.version }}-${{ matrix.arch[5] }}.rpm
|
||||
mv *.rpm ../
|
||||
mv *.deb ../
|
||||
|
||||
@@ -209,6 +212,14 @@ jobs:
|
||||
package: [tar.gz, deb, rpm]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
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
|
||||
@@ -223,7 +234,7 @@ jobs:
|
||||
name: ${{ matrix.type }}-${{ matrix.arch }}
|
||||
|
||||
- id: package
|
||||
run: echo "::set-output name=name::${{ matrix.type }}-2.${GITHUB_REF##*/}-${{ matrix.arch }}.${{ matrix.package }}"
|
||||
run: echo "::set-output name=name::${{ matrix.type }}-${{ steps.get_version.outputs.version }}-${{ matrix.arch }}.${{ matrix.package }}"
|
||||
|
||||
- name: upload daily release asset
|
||||
id: upload-release-asset
|
||||
@@ -233,7 +244,7 @@ jobs:
|
||||
with:
|
||||
upload_url: ${{ steps.release_url.outputs.name }}
|
||||
asset_path: ./${{ steps.package.outputs.name }}
|
||||
asset_name: ${{ steps.package.outputs.name }}
|
||||
asset_name: ${{ matrix.type }}-${{ steps.get_version.outputs.version }}-daily-${{ matrix.arch }}.${{ matrix.package }}
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
release:
|
||||
@@ -243,17 +254,24 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [arm64, arm, amd64]
|
||||
type: [neuron]
|
||||
package: [tar.gz, deb, rpm]
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v2
|
||||
id: download
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
name: neuron-${{ matrix.arch }}
|
||||
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
|
||||
env:
|
||||
ARCH: ${{ matrix.arch }}
|
||||
run: echo "::set-output name=name::neuron-2.${GITHUB_REF##*/}-${ARCH%%-*}.tar.gz"
|
||||
run: echo "::set-output name=name::${{ matrix.type }}-${{ steps.get_version.outputs.version }}-${{ matrix.arch }}.${{ matrix.package }}"
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
if: github.event_name == 'release'
|
||||
|
||||
Reference in New Issue
Block a user