Skip to content

Commit

Permalink
Use refname instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Drise13 authored Jul 12, 2024
1 parent 83801d0 commit 076b35b
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
run: dotnet publish --configuration Release --output ./publish/ubuntu --no-build

- name: Archive Ubuntu Artifacts
run: zip -r "PetsOptimizer-${{ github.ref }}-ubuntu.zip" ./publish/ubuntu
run: zip -r "PetsOptimizer-${{ github.ref_name }}-ubuntu.zip" ./publish/ubuntu

- name: Upload Ubuntu Artifact
uses: actions/upload-artifact@v2
with:
name: "publish-ubuntu-${{ github.ref }}"
path: "PetsOptimizer-${{ github.ref }}-ubuntu.zip"
name: "publish-ubuntu-${{ github.ref_name }}"
path: "PetsOptimizer-${{ github.ref_name }}-ubuntu.zip"

build_windows:
runs-on: windows-latest
Expand All @@ -58,13 +58,13 @@ jobs:
run: dotnet publish --configuration Release --output ./publish/windows --no-build

- name: Archive Windows Artifacts
run: Compress-Archive -Path ./publish/windows -DestinationPath "PetsOptimizer-${{ github.ref }}-windows.zip"
run: Compress-Archive -Path ./publish/windows -DestinationPath "PetsOptimizer-${{ github.ref_name }}-windows.zip"

- name: Upload Windows Artifact
uses: actions/upload-artifact@v2
with:
name: "publish-windows-${{ github.ref }}"
path: "PetsOptimizer-${{ github.ref }}-windows.zip"
name: "publish-windows-${{ github.ref_name }}"
path: "PetsOptimizer-${{ github.ref_name }}-windows.zip"

create_release:
runs-on: ubuntu-latest
Expand All @@ -77,21 +77,21 @@ jobs:
- name: Download Ubuntu build artifacts
uses: actions/download-artifact@v2
with:
name: "publish-ubuntu-${{ github.ref }}"
name: "publish-ubuntu-${{ github.ref_name }}"

- name: Download Windows build artifacts
uses: actions/download-artifact@v2
with:
name: "publish-windows-${{ github.ref }}"
name: "publish-windows-${{ github.ref_name }}"

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false

Expand All @@ -101,8 +101,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "PetsOptimizer-${{ github.ref }}-ubuntu.zip"
asset_name: "PetsOptimizer-${{ github.ref }}-ubuntu.zip"
asset_path: "PetsOptimizer-${{ github.ref_name }}-ubuntu.zip"
asset_name: "PetsOptimizer-${{ github.ref_name }}-ubuntu.zip"
asset_content_type: application/zip

- name: Upload Windows Release Asset
Expand All @@ -111,6 +111,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "PetsOptimizer-${{ github.ref }}-windows.zip"
asset_name: "PetsOptimizer-${{ github.ref }}-windows.zip"
asset_path: "PetsOptimizer-${{ github.ref_name }}-windows.zip"
asset_name: "PetsOptimizer-${{ github.ref_name }}-windows.zip"
asset_content_type: application/zip

0 comments on commit 076b35b

Please sign in to comment.