forked from DSharpPlus/DSharpPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci-skip] Switch ci (DSharpPlus#1221)
* Remove old AppVeyor files to pave way for GH Actions * Updated .gitignore * Tested and confirmed that CI works as intended * Update README.md * ✨ Grammar ✨ * Update last AppVeyor number and formatting * Update last AppVeyor build id * Update last AppVeyor build id * Update last AppVeyor build id
- Loading branch information
Showing
12 changed files
with
235 additions
and
952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "Publish Nightly" | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
publish_nightly: | ||
runs-on: "ubuntu-latest" | ||
if: "!contains(toJSON(github.event.commits.*.message), '[ci-skip]')" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup .NET" | ||
uses: "actions/setup-dotnet@v1" | ||
with: | ||
dotnet-version: "6.0.x" | ||
|
||
- name: "Build Nightly Nuget Packages" | ||
run: "mkdir build && dotnet pack -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='nightly' -p:BuildNumber=0$(( 1091 + ${{ github.run_number }} ))" # We add 1091 since it's the last build number AppVeyor used. | ||
|
||
- name: "Publish Nightly Nuget Packages" | ||
run: "dotnet nuget push \"build/*\" -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json" # If the package version does not comply with SemVer, it will be set as a pre-release version automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: "Publish Release" | ||
on: | ||
release: | ||
types: ["published"] | ||
|
||
jobs: | ||
publish_release: | ||
runs-on: "ubuntu-latest" | ||
if: "!contains(toJSON(github.event.commits.*.message), '[ci-skip]')" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup .NET" | ||
uses: "actions/setup-dotnet@v1" | ||
with: | ||
dotnet-version: "6.0.x" | ||
|
||
- name: "Build Nuget Packages" | ||
run: "mkdir build && dotnet pack -p:SymbolPackageFormat=snupkg --include-symbols -c Release -o build" | ||
|
||
- name: "Publish Nuget Packages" | ||
run: "dotnet nuget push \"build/*\" -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json" | ||
|
||
- name: "Upload Nuget Packages To Github Release" | ||
uses: "ncipollo/release-action@v1" | ||
with: | ||
allowUpdates: true | ||
artifactErrorsFailBuild: true | ||
artifacts: "build/*" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
omitBodyDuringUpdate: true # We don't want to update the body of the release. | ||
omitNameDuringUpdate: true # We don't want to update the name of the release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "Test PR" | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build_pr: | ||
runs-on: "ubuntu-latest" | ||
if: "!contains(toJSON(github.event.commits.*.message), '[ci-skip]')" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Setup .NET" | ||
uses: "actions/setup-dotnet@v1" | ||
with: | ||
dotnet-version: "6.0.x" | ||
|
||
- name: "Build PR" | ||
run: "dotnet build --nologo" | ||
# TODO: Complete DSharpPlus.Test package. Utilizing Github secrets, we can run the bot and have it execute tests on the PR to ensure there aren't any breaking changes. |
Oops, something went wrong.