Skip to content

Fixing the manual release action #134

Fixing the manual release action

Fixing the manual release action #134

Workflow file for this run

name: Repository CI/CD
permissions:
contents: read
packages: write
on:
push:
branches: [ "main" ]
jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '6.0.x', '7.0.x', '8.0.x' ]
steps:
- uses: actions/checkout@v4
- name: Emit .NET 6.0 Framework Version
if: matrix.dotnet == '6.0.x'
run: echo "DOTNET_FX_VERSION=net6.0" >> $GITHUB_ENV
- name: Emit .NET 7.0 Framework Version
if: matrix.dotnet == '7.0.x'
run: echo "DOTNET_FX_VERSION=net7.0" >> $GITHUB_ENV
- name: Emit .NET 8.0 Framework Version
if: matrix.dotnet == '8.0.x'
run: echo "DOTNET_FX_VERSION=net8.0" >> $GITHUB_ENV
- name: Setup .NET ${{ matrix.dotnet }} Framework
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Install SQLite Spatial
run: sudo apt-get install -y libsqlite3-mod-spatialite
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release -f ${{ env.DOTNET_FX_VERSION }}
- name: Test
run: dotnet test --no-build --verbosity normal -c Release -f ${{ env.DOTNET_FX_VERSION }}
build:
name: "Build and Push Artifacts"
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 8.0 Framework
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build -c Release --version-suffix $GITHUB_RUN_ID
- name: Pack NuGet
run: dotnet pack -c Release --no-build --include-symbols --include-source --version-suffix $GITHUB_RUN_ID -o ./nuget
- name: Push NutGet
run: dotnet nuget push ./nuget/*.nupkg -s "https://nuget.pkg.github.com/deveel/index.json" --skip-duplicate --api-key ${{secrets.GITHUB_TOKEN}}
clean:
name: "Clean Old Packages"
needs: build
uses: ./.github/workflows/clean-packages.yml