ci: use real runner images (catthehacker), drop impossible macos-docker, matrix artifacts
This commit is contained in:
@@ -9,14 +9,14 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
artifact: NexusAgent-linux
|
||||
- os: windows-latest
|
||||
artifact: NexusAgent-windows
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install PyInstaller (unix)
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: pip install pyinstaller
|
||||
- name: Install PyInstaller (windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
- name: Install PyInstaller
|
||||
run: pip install pyinstaller
|
||||
- name: Bake token + build (unix)
|
||||
if: matrix.os != 'windows-latest'
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
|
||||
run: |
|
||||
sed "s/__AGENT_TOKEN__/$AGENT_TOKEN/" agents/agent.py > baked.py
|
||||
pyinstaller --onefile --name NexusAgent-${{ matrix.os }} baked.py
|
||||
pyinstaller --onefile --name ${{ matrix.artifact }} baked.py
|
||||
- name: Bake token + build (windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: pwsh
|
||||
@@ -33,9 +33,9 @@ jobs:
|
||||
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
|
||||
run: |
|
||||
(Get-Content agents/agent.py) -replace '__AGENT_TOKEN__', $env:AGENT_TOKEN | Set-Content baked.py
|
||||
pyinstaller --onefile --name NexusAgent-windows baked.py
|
||||
pyinstaller --onefile --name ${{ matrix.artifact }} baked.py
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: NexusAgent-${{ matrix.os }}
|
||||
path: dist/NexusAgent*
|
||||
name: ${{ matrix.artifact }}
|
||||
path: dist/
|
||||
|
||||
Reference in New Issue
Block a user