Allow installing an sdk to a target path (#230) #317
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: Publish | |
on: | |
push: | |
branches: [ "main" ] | |
tags: [ "*" ] | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
rid: linux-x64 | |
zipSuffix: tar.gz | |
- os: ubuntu-24.04 | |
rid: linux-arm64 | |
zipSuffix: tar.gz | |
- os: windows-latest | |
rid: win-x64 | |
zipSuffix: zip | |
- os: macos-latest | |
rid: osx-x64 | |
zipSuffix: tar.gz | |
- os: macos-latest | |
rid: osx-arm64 | |
zipSuffix: tar.gz | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install linux arm64 prereqs | |
if: matrix.rid == 'linux-arm64' | |
run: | | |
sudo dpkg --add-architecture arm64 | |
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.sources <<EOF | |
Types: deb | |
URIs: http://ports.ubuntu.com/ubuntu-ports/ | |
Suites: noble noble-updates noble-backports | |
Components: main universe restricted multiverse | |
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg | |
Architectures: arm64 | |
EOF' | |
sudo sed -i -e 's/\(Signed-By:.*$\)/\1\nArchitectures: amd64/g' /etc/apt/sources.list.d/ubuntu.sources | |
sudo apt update | |
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64 | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '9.0.*' | |
- name: Restore local tools | |
run: dotnet tool restore | |
- name: Publish Windows | |
if: matrix.os == 'windows-latest' | |
shell: pwsh | |
run: ./publish.ps1 | |
- name: Publish Unix | |
if: matrix.os != 'windows-latest' | |
run: ./publish.sh -r ${{ matrix.rid }} | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dnvm-${{ matrix.rid }}.${{ matrix.zipSuffix }} | |
# A file, directory or wildcard pattern that describes what to upload | |
path: artifacts/dnvm-*-${{ matrix.rid }}.${{ matrix.zipSuffix }} | |
release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: publish | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Download release artifacts | |
uses: actions/download-artifact@v4 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Make Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: true | |
draft: true | |
files: | |
dnvm-*/dnvm-* |