use better artifect name

This commit is contained in:
sijie.sun 2024-08-03 12:41:59 +08:00 committed by Sijie.Sun
parent 4a0adaa3f8
commit 02b5b5f3c7
3 changed files with 32 additions and 14 deletions

View File

@ -36,29 +36,40 @@ jobs:
include: include:
- TARGET: aarch64-unknown-linux-musl - TARGET: aarch64-unknown-linux-musl
OS: ubuntu-latest OS: ubuntu-latest
ARTIFACT_NAME: linux-aarch64
- TARGET: x86_64-unknown-linux-musl - TARGET: x86_64-unknown-linux-musl
OS: ubuntu-latest OS: ubuntu-latest
ARTIFACT_NAME: linux-x86_64
- TARGET: mips-unknown-linux-musl - TARGET: mips-unknown-linux-musl
OS: ubuntu-latest OS: ubuntu-latest
ARTIFACT_NAME: linux-mips
- TARGET: mipsel-unknown-linux-musl - TARGET: mipsel-unknown-linux-musl
OS: ubuntu-latest OS: ubuntu-latest
ARTIFACT_NAME: linux-mipsel
- TARGET: armv7-unknown-linux-musleabihf # raspberry pi 2-3-4, not tested
OS: ubuntu-latest
ARTIFACT_NAME: linux-armv7hf
- TARGET: armv7-unknown-linux-musleabi # raspberry pi 2-3-4, not tested
OS: ubuntu-latest
ARTIFACT_NAME: linux-armv7
- TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested
OS: ubuntu-latest
ARTIFACT_NAME: linux-armhf
- TARGET: arm-unknown-linux-musleabi # raspberry pi 0-1, not tested
OS: ubuntu-latest
ARTIFACT_NAME: linux-arm
- TARGET: x86_64-apple-darwin - TARGET: x86_64-apple-darwin
OS: macos-latest OS: macos-latest
ARTIFACT_NAME: macos-x86_64
- TARGET: aarch64-apple-darwin - TARGET: aarch64-apple-darwin
OS: macos-latest OS: macos-latest
ARTIFACT_NAME: macos-aarch64
- TARGET: x86_64-pc-windows-msvc - TARGET: x86_64-pc-windows-msvc
OS: windows-latest OS: windows-latest
ARTIFACT_NAME: windows-x86_64
- TARGET: armv7-unknown-linux-musleabihf # raspberry pi 2-3-4, not tested
OS: ubuntu-latest
- TARGET: armv7-unknown-linux-musleabi # raspberry pi 2-3-4, not tested
OS: ubuntu-latest
- TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested
OS: ubuntu-latest
- TARGET: arm-unknown-linux-musleabi # raspberry pi 0-1, not tested
OS: ubuntu-latest
runs-on: ${{ matrix.OS }} runs-on: ${{ matrix.OS }}
env: env:
NAME: easytier NAME: easytier
@ -129,13 +140,13 @@ jobs:
mv ./target/$TARGET/release/easytier-core"$SUFFIX" ./artifacts/objects/ mv ./target/$TARGET/release/easytier-core"$SUFFIX" ./artifacts/objects/
mv ./target/$TARGET/release/easytier-cli"$SUFFIX" ./artifacts/objects/ mv ./target/$TARGET/release/easytier-cli"$SUFFIX" ./artifacts/objects/
tar -cvf ./artifacts/$NAME-$TARGET-$TAG.tar -C ./artifacts/objects/ . mv ./artifacts/objects/* ./artifacts/
rm -rf ./artifacts/objects/ rm -rf ./artifacts/objects/
- name: Archive artifact - name: Archive artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: easytier-${{ matrix.OS }}-${{ matrix.TARGET }} name: easytier-${{ matrix.ARTIFACT_NAME }}
path: | path: |
./artifacts/* ./artifacts/*

View File

@ -37,20 +37,26 @@ jobs:
- TARGET: aarch64-unknown-linux-musl - TARGET: aarch64-unknown-linux-musl
OS: ubuntu-latest OS: ubuntu-latest
GUI_TARGET: aarch64-unknown-linux-gnu GUI_TARGET: aarch64-unknown-linux-gnu
ARTIFACT_NAME: linux-aarch64
- TARGET: x86_64-unknown-linux-musl - TARGET: x86_64-unknown-linux-musl
OS: ubuntu-latest OS: ubuntu-latest
GUI_TARGET: x86_64-unknown-linux-gnu GUI_TARGET: x86_64-unknown-linux-gnu
ARTIFACT_NAME: linux-x86_64
- TARGET: x86_64-apple-darwin - TARGET: x86_64-apple-darwin
OS: macos-latest OS: macos-latest
GUI_TARGET: x86_64-apple-darwin GUI_TARGET: x86_64-apple-darwin
ARTIFACT_NAME: macos-x86_64
- TARGET: aarch64-apple-darwin - TARGET: aarch64-apple-darwin
OS: macos-latest OS: macos-latest
GUI_TARGET: aarch64-apple-darwin GUI_TARGET: aarch64-apple-darwin
ARTIFACT_NAME: macos-aarch64
- TARGET: x86_64-pc-windows-msvc - TARGET: x86_64-pc-windows-msvc
OS: windows-latest OS: windows-latest
GUI_TARGET: x86_64-pc-windows-msvc GUI_TARGET: x86_64-pc-windows-msvc
ARTIFACT_NAME: windows-x86_64
runs-on: ${{ matrix.OS }} runs-on: ${{ matrix.OS }}
env: env:
NAME: easytier NAME: easytier
@ -172,13 +178,13 @@ jobs:
fi fi
fi fi
tar -cvf ./artifacts/$NAME-$TARGET-$TAG.tar -C ./artifacts/objects/ . mv ./artifacts/objects/* ./artifacts/
rm -rf ./artifacts/objects/ rm -rf ./artifacts/objects/
- name: Archive artifact - name: Archive artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: easytier-gui-${{ matrix.OS }}-${{ matrix.TARGET }} name: easytier-gui-${{ matrix.ARTIFACT_NAME }}
path: | path: |
./artifacts/* ./artifacts/*

View File

@ -36,6 +36,7 @@ jobs:
include: include:
- TARGET: android - TARGET: android
OS: ubuntu-latest OS: ubuntu-latest
ARTIFACT_NAME: android
runs-on: ${{ matrix.OS }} runs-on: ${{ matrix.OS }}
env: env:
NAME: easytier NAME: easytier
@ -130,13 +131,13 @@ jobs:
TAG=$GITHUB_SHA TAG=$GITHUB_SHA
fi fi
tar -cvf ./artifacts/$NAME-$TARGET-$TAG.tar -C ./artifacts/objects/ . mv ./artifacts/objects/* ./artifacts
rm -rf ./artifacts/objects/ rm -rf ./artifacts/objects/
- name: Archive artifact - name: Archive artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: easytier-gui-${{ matrix.TARGET }} name: easytier-gui-${{ matrix.ARTIFACT_NAME }}
path: | path: |
./artifacts/* ./artifacts/*