Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardoporro authored Jan 22, 2024
1 parent f55081d commit 9ea3f5c
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
@@ -1,33 +1,29 @@
name: Release Workflow
name: Release

on:
create:
branches:
- 'release/*'

jobs:
build-and-publish:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x.x' # You can adjust the version if needed

- name: Extract version
run: |
version=$(echo "${{ github.ref }}" | sed 's/refs\/heads\/release\///')
echo "Version extracted from branch name: $version"
id: extract-version


- name: Build
run: |
version=$(echo "${{ github.ref }}" | sed 's/refs\/heads\/release\///')
echo $version
dotnet restore
dotnet build --configuration Release
dotnet build --configuration Release -p:Version=$version
- name: Push
run: |
packages=$(find . -name '*.nupkg')
Expand Down

0 comments on commit 9ea3f5c

Please sign in to comment.