Update build.yml
This commit is contained in:
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
@@ -11,6 +11,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-dotnet@v3
|
- uses: actions/setup-dotnet@v3
|
||||||
@@ -22,8 +23,12 @@ jobs:
|
|||||||
|
|
||||||
- run: dotnet restore CringeLauncher/CringeLauncher.csproj --locked-mode
|
- run: dotnet restore CringeLauncher/CringeLauncher.csproj --locked-mode
|
||||||
name: Restore Project
|
name: Restore Project
|
||||||
|
|
||||||
|
- name: Git Version
|
||||||
|
id: version
|
||||||
|
uses: codacy/git-version@2.7.1
|
||||||
|
|
||||||
- run: dotnet publish -c Release -o ./pub CringeLauncher/CringeLauncher.csproj --no-restore /p:PackageVersion="${{ steps.version.outputs.version }}" /p:AssemblyVersion="${{ steps.version.outputs.version }}"
|
- run: dotnet publish -c Release -o ./pub CringeLauncher/CringeLauncher.csproj --no-restore -p:Version="${{ steps.version.outputs.version }}"
|
||||||
id: publish
|
id: publish
|
||||||
name: Build Project
|
name: Build Project
|
||||||
|
|
||||||
@@ -33,7 +38,28 @@ jobs:
|
|||||||
working-directory: ./pub
|
working-directory: ./pub
|
||||||
name: Zip Results
|
name: Zip Results
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- name: Create Draft Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
name: launcher
|
tag_name: ${{ steps.version.outputs.version }}
|
||||||
path: pub.zip
|
release_name: Launcher Release
|
||||||
|
draft: true
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./pub.zip
|
||||||
|
asset_name: CringeLauncher.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- uses: eregon/publish-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
release_id: ${{ steps.create_release.outputs.id }}
|
||||||
|
Reference in New Issue
Block a user