Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Ionctl AOT (Linux) | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Install native deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt install musl musl-dev clang lld zlib1g-dev | |
| - name: Restore dependencies | |
| run: dotnet restore ./src/src.sln | |
| - name: Publish Ionctl as native AOT | |
| run: | | |
| dotnet publish ./src/Ionctl/Ionctl.csproj \ | |
| -c Release \ | |
| -r linux-musl-x64 \ | |
| /p:PublishAot=true \ | |
| /p:SelfContained=true \ | |
| /p:PublishSingleFile=true \ | |
| -o ./ionctl-out | |
| - name: Rename binary | |
| run: mv ./ionctl-out/Ionctl ./ionctl-linux-x64 | |
| - name: Upload release artifact | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ./ionctl-linux-x64 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |