Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #21

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #21

Workflow file for this run

name: .NET
env:
GITHUB_USER: Nihlus
GITHUB_FEED: https://nuget.pkg.github.com/Nihlus
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
- push
- pull_request
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
platform: [ AnyCPU, x64 ]
include:
- os: windows-latest
platform: x86
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- name: Install Dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install gcc g++ gcc-multilib-i686-linux-gnu g++-multilib-i686-linux-gnu cmake make
- name: Build
run: |
dotnet restore
dotnet build -c Release --no-restore -p:Platform=${{ matrix.platform }}
- name: Test
run: dotnet test Tests/Mono.DllMap.Tests -c Release --no-restore --no-build --verbosity minimal
- name: Test (native)
run: dotnet test Tests/AdvancedDLSupport.Tests -c Release --verbosity minimal -p:Platform=${{ matrix.platform }}
- name: Package
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.platform == 'AnyCPU'
run: dotnet pack -c Release --no-restore --no-build --version-suffix "github$GITHUB_RUN_ID"
- uses: actions/upload-artifact@v3
with:
name: nupkg
path: nuget/*
prerelease:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Download package artifacts
uses: actions/[email protected]
with:
name: nupkg
path: nuget
# To ensure that the current version being pushed does not get pruned we prune first.
- name: Prune packages older than 4 versions (new version is the 5th)
uses: smartsquaregmbh/[email protected]
with:
keep: 4
names: |
AdvancedDLSupport
Mono.DllMap
- name: Push to GitHub Feed
run: |
for f in ./nuget/*; do
curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
done