Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pregress committed Oct 1, 2024
1 parent 893ebf2 commit 450f1a4
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,15 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Set up Git for tagging
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
- name: Extract version from tag
id: get_version
run: |
echo "##[set-output name=version;]${GITHUB_REF##*/}"
- id: get_version
name: Get version
uses: jannemattila/get-version-from-tag@v3

- name: Update Assembly and NuGet package version
run: |
version=${{ steps.get_version.outputs.version }}
echo "Updating Assembly and NuGet package versions to ${version}"
sed -i "s/<VersionPrefix>.*<\/VersionPrefix>/<VersionPrefix>${version}<\/VersionPrefix>/g" ./src/ApimSanitizer.csproj
sed -i "s/<VersionPrefix>.*<\/VersionPrefix>/<VersionPrefix>${version}<\/VersionPrefix>/g" ./ApimSanitizer.csproj
working-directory: src

- name: Build the project
Expand All @@ -57,7 +51,9 @@ jobs:
Release version ${{ steps.get_version.outputs.version }}.
draft: false
prerelease: false
files: ./artifacts/*.nupkg
files: ./artifacts/*.nupkg
working-directory: src

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit 450f1a4

Please sign in to comment.