Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Release

on:
push:
tags:
- 'v*.*.*'
pull_request:
workflow_dispatch:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: '10.0.x'

- name: Test
run: dotnet test src/OpenAPIDyalog.Tests/OpenAPIDyalog.Tests.csproj

build:
name: Build ${{ matrix.rid }}
needs: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- { rid: win-x64, os: windows-latest, ext: .exe }
- { rid: win-arm64, os: windows-latest, ext: .exe }
- { rid: linux-x64, os: ubuntu-latest, ext: "" }
- { rid: linux-arm64, os: ubuntu-latest, ext: "" }
- { rid: osx-x64, os: macos-latest, ext: "" }
- { rid: osx-arm64, os: macos-latest, ext: "" }

steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: '10.0.x'

- name: Publish
run: >
dotnet publish src/OpenAPIDyalog/OpenAPIDyalog.csproj
-r ${{ matrix.rid }}
--self-contained true
-p:PublishSingleFile=true
-p:PublishReadyToRun=true
-p:DebugType=none
-p:DebugSymbols=false
-c Release
-o publish/${{ matrix.rid }}

- name: Stage artifact
shell: bash
run: |
mv "publish/${{ matrix.rid }}/OpenAPIDyalog${{ matrix.ext }}" \
"publish/${{ matrix.rid }}/openapidyalog-${{ matrix.rid }}${{ matrix.ext }}"

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: openapidyalog-${{ matrix.rid }}
path: publish/${{ matrix.rid }}/openapidyalog-${{ matrix.rid }}${{ matrix.ext }}
retention-days: 7

release:
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
path: artifacts
merge-multiple: true

- name: Stage notices and checksums
run: |
cp THIRD_PARTY_NOTICES.txt artifacts/
cd artifacts && sha256sum * > SHA256SUMS.txt

- uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
name: Release ${{ github.ref_name }}
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, '-') }}
files: artifacts/*
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
# Holdens Testing
pet-store/*
#!pet-store/PetStore-Client/
OpenAPIDyalog/output/*
src/OpenAPIDyalog/output/*
*.sln
site/
TestAPIClient/
GenTestAPIClient/

# dotenv files
.env
Expand Down
100 changes: 0 additions & 100 deletions OpenAPIDyalog/Models/TemplateContext.cs

This file was deleted.

22 changes: 0 additions & 22 deletions OpenAPIDyalog/OpenAPIDyalog.csproj

This file was deleted.

Loading