Skip to content

Commit

Permalink
Update resharper inspections and github workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihlus committed Mar 31, 2024
1 parent 8985597 commit cb65596
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 48 deletions.
107 changes: 60 additions & 47 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,59 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Build
run: |
dotnet restore
dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore --no-build --verbosity minimal

- name: Package
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: dotnet pack -c Release --no-restore --no-build --version-suffix "github$GITHUB_RUN_ID"

- uses: actions/upload-artifact@v3
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
with:
name: nupkg
path: nuget/*

- name: Build Docs
if: github.event_name == 'push'
run: |
dotnet tool restore
cd ./docfx
sed -i -E "s/%APP_VERSION%/${GITHUB_REF_NAME}/" docfx_project/docfx.json
dotnet docfx docfx_project/docfx.json
- uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
name: docfx-site
path: docfx/docfx_project/_site/
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Build
run: |
dotnet restore
dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-restore --no-build --verbosity minimal

- name: Inspect
uses: JetBrains/[email protected]
with:
tool-version: 2023.3.4
solution: Remora.Discord.sln
build: false
no-build: true
telemetry-optout: true

- name: Package
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: dotnet pack -c Release --no-restore --no-build --version-suffix "github$GITHUB_RUN_ID"

- uses: actions/upload-artifact@v4
with:
name: nupkg
path: nuget/*

- name: Build Docs
if: github.event_name == 'push'
run: |
dotnet tool restore
cd ./docfx
sed -i -E "s/%APP_VERSION%/${GITHUB_REF_NAME}/" docfx_project/docfx.json
dotnet docfx docfx_project/docfx.json
- uses: actions/upload-artifact@v4
if: github.event_name == 'push'
with:
name: docfx-site
path: docfx/docfx_project/_site/

permissions:
security-events: write

publish_docs:
name: Publish Documentation
Expand All @@ -72,12 +83,12 @@ jobs:

steps:
- name: Checkout triggering branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: base

- name: Checkout gh-pages
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: gh-pages
path: site
Expand All @@ -86,7 +97,7 @@ jobs:
run: bash base/docfx/scripts/prepare.sh

- name: Download documentation artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docfx-site
path: site/${{ github.ref_name }}
Expand All @@ -108,15 +119,17 @@ jobs:

steps:
- name: Download package artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
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/delete-old-packages@v0.6.0
uses: smartsquaregmbh/delete-old-packages@v0.8.0
with:
organization: Remora
type: nuget
keep: 4
names: |
Remora.Discord
Expand Down
18 changes: 18 additions & 0 deletions .idea/.idea.Remora.Discord/.idea/deployment.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cb65596

Please sign in to comment.