Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 14, 2024
1 parent 2516832 commit 8a20f74
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit 8a20f74

Please sign in to comment.