-
Notifications
You must be signed in to change notification settings - Fork 3
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
7fc71ae
commit d90f2bd
Showing
5 changed files
with
98 additions
and
3 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,7 @@ | ||
VERSION=$1 | ||
|
||
xmlstarlet edit \ | ||
--inplace \ | ||
--update "/Project/PropertyGroup/AssemblyVersion" \ | ||
--value "$VERSION" \ | ||
GoDough.csproj |
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,4 @@ | ||
VERSION=$1 | ||
|
||
dotnet pack --configuration Release | ||
echo dotnet nuget push GoDough.${VERSION}.nupkg |
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,47 @@ | ||
name: Build & Release | ||
on: push | ||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
jobs: | ||
on_push: | ||
permissions: | ||
contents: write | ||
packages: write | ||
name: On Push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.8.1 | ||
- name: Setup xmlstarlet | ||
run: sudo apt update && apt install -y xmlstarlet | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 6.0.421 | ||
- name: Cache npm | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
- name: Build | ||
run: dotnet build --configuration Release | ||
- name: Test | ||
run: dotnet test --configuration Release --no-build | ||
- name: Publish package | ||
run: | | ||
npx \ | ||
--package @semantic-release/commit-analyzer \ | ||
--package @semantic-release/release-notes-generator \ | ||
--package @semantic-release/github \ | ||
--package @semantic-release/exec \ | ||
--package @semantic-release/git \ | ||
semantic-release | ||
if: github.ref_name == 'main' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,36 @@ | ||
module.exports = { | ||
branches: ['main'], | ||
plugins: [ | ||
[ | ||
'@semantic-release/commit-analyzer', | ||
{ | ||
preset: 'angular', | ||
releaseRules: [ | ||
{ type: 'docs', scope: 'README', release: 'patch' }, | ||
{ type: 'refactor', release: 'patch' }, | ||
{ type: 'style', release: 'patch' }, | ||
], | ||
parserOpts: { | ||
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'], | ||
}, | ||
}, | ||
], | ||
'@semantic-release/release-notes-generator', | ||
'@semantic-release/github', | ||
[ | ||
'@semantic-release/exec', | ||
{ | ||
prepareCmd: './.github/prepare-library.sh ${nextRelease.version}', | ||
publishCmd: './.github/release-package.sh ${nextRelease.version}', | ||
}, | ||
], | ||
[ | ||
'@semantic-release/git', | ||
{ | ||
assets: ['GoDough.csproj'], | ||
message: | ||
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}', | ||
}, | ||
], | ||
], | ||
}; |
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<Project Sdk="Godot.NET.Sdk/4.0.2"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<EnableDynamicLoading>true</EnableDynamicLoading> | ||
<AssemblyVersion>3.4.5</AssemblyVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0"/> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0"/> | ||
</ItemGroup> | ||
</Project> |