-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2516832
commit 8a20f74
Showing
1 changed file
with
58 additions
and
0 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,58 @@ | ||
name: Release new version | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
publish-nuget: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Get version from tag | ||
id: get-version | ||
uses: battila7/get-version-action@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Set AssemblyInfo version | ||
uses: dannevesdantas/[email protected] | ||
with: | ||
path: ${{ github.workspace }}/Moffat.EndlessOnline.SDK/Properties | ||
version: ${{ steps.get-version.outputs.version-without-v }} | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build -c Release --no-restore | ||
- name: Pack NuGet package | ||
run: dotnet pack Moffat.EndlessOnline.SDK/Moffat.EndlessOnline.SDK.csproj -c Release --no-build --no-restore -p:PackageVersion=${{ steps.get-version.outputs.version-without-v }} -o ${{ github.workspace }}/pkgs | ||
- name: Upload build artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: pkg | ||
path: ${{ github.workspace }}/pkgs/*.nupkg | ||
|
||
github-release: | ||
if: false | ||
needs: publish-nuget | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get version from tag | ||
id: get-version | ||
uses: battila7/get-version-action@v2 | ||
- name: Parse Changelog | ||
id: changelog | ||
uses: coditory/changelog-parser@v1 | ||
with: | ||
version: ${{ steps.get-version.outputs.version-without-v }} | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: Moffat.EndlessOnline.SDK v${{ steps.changelog.outputs.version }} | ||
body: ${{ steps.changelog.outputs.description }} |