mirror of
https://github.com/lantean-code/qbtmud.git
synced 2025-10-23 04:52:22 +00:00
Update dotnet.yml
This commit is contained in:
18
.github/workflows/dotnet.yml
vendored
18
.github/workflows/dotnet.yml
vendored
@@ -54,24 +54,32 @@ jobs:
|
|||||||
zip -r "../qbt-mud-v${{ steps.gitversion.outputs.FullSemVer }}.zip" public
|
zip -r "../qbt-mud-v${{ steps.gitversion.outputs.FullSemVer }}.zip" public
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Check if Tag Exists
|
||||||
|
id: check_tag
|
||||||
|
run: |
|
||||||
|
if git rev-parse "v${{ steps.gitversion.outputs.FullSemVer }}" >/dev/null 2>&1; then
|
||||||
|
echo "TAG_EXISTS=true" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "TAG_EXISTS=false" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && env.TAG_EXISTS == 'false'
|
||||||
id: create_release # Add an ID to reference this step's outputs
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.gitversion.outputs.FullSemVer }}
|
tag_name: v${{ steps.gitversion.outputs.FullSemVer }}
|
||||||
release_name: Release v${{ steps.gitversion.outputs.FullSemVer }}
|
release_name: Release v${{ steps.gitversion.outputs.FullSemVer }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
generate_release_notes: true
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Upload Release Asset
|
- name: Upload Release Asset
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' && env.TAG_EXISTS == 'false'
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }} # Reference the upload URL from the release step
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: qbt-mud-v${{ steps.gitversion.outputs.FullSemVer }}.zip
|
asset_path: qbt-mud-v${{ steps.gitversion.outputs.FullSemVer }}.zip
|
||||||
asset_name: qbt-mud-v${{ steps.gitversion.outputs.FullSemVer }}.zip
|
asset_name: qbt-mud-v${{ steps.gitversion.outputs.FullSemVer }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
Reference in New Issue
Block a user