Skip to content

Commit

Permalink
Update dotnet-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Aug 31, 2024
1 parent b7a8364 commit c8abb53
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/dotnet-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Extract Version from tag
id: tag
uses: actions/github-script@v7
with:
script: |
const version = context.ref.replace('refs/tags/', '');
return version.slice(1);
- name: Restore dependencies
working-directory: ./src
run: dotnet restore
Expand All @@ -29,15 +36,11 @@ jobs:
with:
files: ./publish/temp
dest: ./publish/Nager.FineDustSensor.SensorControl.zip
- name: Get the version
id: get_version
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
shell: bash
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: nager/Nager.FineDustSensor
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./publish/Nager.FineDustSensor.SensorControl.zip
tag: ${{ steps.get_version.outputs.tag }}
tag: ${{ steps.tag.outputs.result }}
overwrite: true

0 comments on commit c8abb53

Please sign in to comment.