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
13 changes: 11 additions & 2 deletions .github/workflows/nuget_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,20 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
NUGET_TOKEN: ${{ secrets.NUGET_API_KEY }}
run: npx semantic-release

- name: Get release version
id: version
run: |
if [ -f .release-version ]; then
echo "version=$(cat .release-version)" >> $GITHUB_OUTPUT
echo "released=true" >> $GITHUB_OUTPUT
fi

- name: Pack
run: dotnet pack --configuration Release --output nupkg
if: steps.version.outputs.released == 'true'
run: dotnet pack --configuration Release --output nupkg -p:Version=${{ steps.version.outputs.version }}

- name: Push to NuGet
if: steps.version.outputs.released == 'true'
run: dotnet nuget push "nupkg/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,6 @@ _NCrunch*
*.vsix

# BenchmarkDotNet
BenchmarkDotNet.Artifacts/
BenchmarkDotNet.Artifacts/
# Semantic Release version file
.release-version
18 changes: 1 addition & 17 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,10 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "sed -i 's/<Version>[^<]*<\\/Version>/<Version>${nextRelease.version}<\\/Version>/' Directory.Build.props"
}
],
[
"@semantic-release/git",
{
"assets": [
"Directory.Build.props",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
"prepareCmd": "echo ${nextRelease.version} > .release-version"
}
],
[
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>1.1.0</Version>
<Version>99.99.99</Version>
</PropertyGroup>
</Project>
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"description": "Effect system for Trax workflows",
"devDependencies": {
"semantic-release": "^23.0.0",
"@semantic-release/changelog": "^6.0.0",
"@semantic-release/exec": "^6.0.0",
"@semantic-release/git": "^10.0.0",
"@semantic-release/github": "^9.0.0",
"conventional-commits-parser": "^5.0.0"
}
Expand Down
Loading