Skip to content

Commit c8abb53

Browse files
committed
Update dotnet-release.yml
1 parent b7a8364 commit c8abb53

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/dotnet-release.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ jobs:
1616
uses: actions/setup-dotnet@v4
1717
with:
1818
dotnet-version: 8.0.x
19+
- name: Extract Version from tag
20+
id: tag
21+
uses: actions/github-script@v7
22+
with:
23+
script: |
24+
const version = context.ref.replace('refs/tags/', '');
25+
return version.slice(1);
1926
- name: Restore dependencies
2027
working-directory: ./src
2128
run: dotnet restore
@@ -29,15 +36,11 @@ jobs:
2936
with:
3037
files: ./publish/temp
3138
dest: ./publish/Nager.FineDustSensor.SensorControl.zip
32-
- name: Get the version
33-
id: get_version
34-
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
35-
shell: bash
3639
- name: Upload binaries to release
3740
uses: svenstaro/upload-release-action@v2
3841
with:
3942
repo_name: nager/Nager.FineDustSensor
4043
repo_token: ${{ secrets.GITHUB_TOKEN }}
4144
file: ./publish/Nager.FineDustSensor.SensorControl.zip
42-
tag: ${{ steps.get_version.outputs.tag }}
45+
tag: ${{ steps.tag.outputs.result }}
4346
overwrite: true

0 commit comments

Comments
 (0)