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