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
109 changes: 109 additions & 0 deletions .github/workflows/build-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Build Commit

on:
push:
paths:
- ".github/workflows/build-commit.yml"
- "DSharpPlus*/**"
- "tools/**"
- "*.sln"
workflow_dispatch:

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1

jobs:
build-commit:
name: Build Commit
runs-on: ubuntu-latest
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8
7
- name: Build Project
run: dotnet build
package-commit:
name: Package Commit
runs-on: ubuntu-latest
needs: build-commit
if: github.ref_name == 'master'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8
7
- name: Get Nightly Version
id: nightly
run: printf "version=%0*d" 5 $(( 1195 + 691 + ${{ github.run_number }} )) >> "$GITHUB_OUTPUT"
- name: Package Project
run: |
# We add 1195 since it's the last build number AppVeyor used.
# We add 686 since it's the last build number GitHub Actions used before the workflow was renamed.
dotnet pack -c Release -o build -p:Nightly=${{ steps.nightly.outputs.version }}
dotnet nuget push "build/*" --skip-duplicate -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json
echo LATEST_STABLE_VERSION=$(git describe --abbrev=0 --tags 2>/dev/null || echo '') >> $GITHUB_ENV
dotnet run --project ./tools/AutoUpdateChannelDescription -p:Nightly=${{ steps.nightly.outputs.version }}
env:
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_GUILD_ID: ${{ secrets.DISCORD_GUILD_ID }}
DISCORD_CHANNEL_ID: ${{ secrets.DISCORD_CHANNEL_ID }}
DISCORD_CHANNEL_TOPIC: ${{ secrets.DISCORD_CHANNEL_TOPIC }}
NUGET_URL: ${{ secrets.NUGET_URL }}
GITHUB_URL : ${{ github.server_url }}/${{ github.repository }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: DSharpPlus-Nightly-${{ steps.nightly.outputs.version }}.zip
path: ./build/*
document-commit:
name: Document Commit
runs-on: ubuntu-latest
needs: package-commit
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8
7
- name: Build Project
run: |
dotnet build
dotnet tool update -g docfx --prerelease
docfx docs/docfx.json
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/_site/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
38 changes: 38 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build PR

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths:
- ".github/workflows/build-pr.yml"
- "DSharpPlus*/**"
- "tools/**"
- "*.sln"
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1

jobs:
build-commit:
name: "Build PR #${{ github.event.pull_request.number }}"
runs-on: ubuntu-latest
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8
7
- name: Build Project
run: dotnet build
57 changes: 0 additions & 57 deletions .github/workflows/docs.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/publish_nightly_master.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/publish_release_master.yml

This file was deleted.

Loading