Skip to content

2.4.2 Fixes and new .net version #30

2.4.2 Fixes and new .net version

2.4.2 Fixes and new .net version #30

Workflow file for this run

name: Run tests and release container
on:
release:
types: [created]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
dotNetVersion: net8.0
dotNetConfiguration: Release
steps:
# checkout the repo
- uses: actions/checkout@v4
# install dependencies, build, and test
- name: Setup Dotnet for use with actions
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Cache Nuget Packages
uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Run automated unit and integration tests
run: dotnet test
publish:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
dotNetVersion: net8.0
dotNetConfiguration: Release
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Prepare release body (description)
id: prep_body
run: |
echo "${{ github.event.release.body }}" > changes.md
- name: Discord notification
uses: appleboy/[email protected]
with:
webhook_id: ${{ secrets.DISCORD_RELEASE_CHANNEL_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_RELEASE_CHANNEL_WEBHOOK_TOKEN }}
username: GitHub Releases
message: "New release of **${{ github.repository }}**\nVersion: ${{ github.ref_name }} (${{github.event.release.name}})\n<${{ github.event.release.html_url }}>"
file: changes.md