Skip to content

v0.3.1

v0.3.1 #5

Workflow file for this run

# WARNING: This file is automatically generated by ../regenerate-actions.sh
name: Release
on:
release:
types:
- published
defaults:
run:
shell: bash
jobs:
build:
name: Deploy release
runs-on: ubuntu-24.04
permissions:
packages: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8.x
9.x
- name: Setup NuGet
run: |
dotnet nuget update source csgals --store-password-in-clear-text --username CSGALS --password ${{ secrets.GITHUB_TOKEN }}
dotnet nuget enable source csgals
- name: Setup Verlite
run: |
verlite_version="$(grep '"Verlite\.MsBuild"' Directory.Build.props | LC_ALL=en_US.utf8 grep -Po 'Version="\K[^"]+')"
dotnet tool install --global Verlite.CLI --version "$verlite_version"
verlite . --enable-shadow-repo --auto-fetch --verbosity verbatim
- name: Verify tag
run: |
[[ "v$(verlite .)" == "${GITHUB_REF#refs/*/}" ]] # error out if the versions don't match
- name: Restore
run: dotnet restore
- name: Build
run: dotnet publish --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Debug --logger GitHubActions -p:CollectCoverage=true
-p:CoverletOutputFormat=cobertura
- name: Pack
run: dotnet pack -p:PackageOutputPath="$(pwd)/artifacts" --configuration Release
--no-restore
- name: Build CSS Packages
run: |
bash package.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: artifacts
if-no-files-found: error
path: |
artifacts/*
- name: Upload release
run: |
set -x
tag="${GITHUB_REF#refs/*/}"
files=()
IFS=$'\n';
for asset in $(find ./artifacts -maxdepth 1 -name "*.zip"); do
files+=("$asset")
done
IFS=$'\n';
for asset in $(find ./artifacts -name "*.nupkg"); do
files+=("$asset")
done
gh release upload "$tag" "${files[@]}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish NuGet GitHub
run: dotnet nuget push 'artifacts/*.nupkg' -k ${{ secrets.GITHUB_TOKEN }} -s
csgals --skip-duplicate --no-symbols
- name: Publish NuGet.org
run: |
dotnet nuget push 'artifacts/*.nupkg' -k ${NUGETORG_TOKEN} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
env:
NUGETORG_TOKEN: ${{ secrets.NUGETORG_TOKEN }}