main.yml creates release

This commit is contained in:
J. Fronny 2020-03-08 16:01:18 +01:00 committed by GitHub
parent 458320c823
commit 45b1e5e9f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 20 deletions

View File

@ -10,6 +10,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Run a multi-line script - name: Run a multi-line script
id: base_init
run: | run: |
$(new-object System.Net.WebClient).DownloadFile("https://www.github.com/JFronny/UpTool2/releases/latest/download/Tools.zip", "$($(pwd).Path)\Tools.zip") $(new-object System.Net.WebClient).DownloadFile("https://www.github.com/JFronny/UpTool2/releases/latest/download/Tools.zip", "$($(pwd).Path)\Tools.zip")
& "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip & "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip
@ -18,23 +19,26 @@ jobs:
rm Remove.bat rm Remove.bat
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" -noLogo -verbosity:m -p:Configuration=Release & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" -noLogo -verbosity:m -p:Configuration=Release
cp *\bin\Release\netcoreapp3.1\package.zip . cp *\bin\Release\netcoreapp3.1\package.zip .
# - name: Create Release $file = Get-Item $(Resolve-Path *\bin\Release\netcoreapp3.1\*.exe).Path
# id: create_release $asmver = $([Reflection.Assembly]::Loadfile($file.DirectoryName + "\" + $file.BaseName + ".dll").GetName().version.ToString())
# uses: actions/create-release@v1.0.1 echo "::set-output name=vers::$asmver"
# env: - name: Create Release
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} id: create_release
# with: uses: actions/create-release@v1.0.1
# tag_name: ${{ steps.base_init.outputs.vers }} env:
# release_name: Release ${{ steps.base_init.outputs.vers }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# draft: false with:
# prerelease: false tag_name: ${{ steps.base_init.outputs.vers }}
# - name: Upload Release Asset release_name: Release ${{ steps.base_init.outputs.vers }}
# id: upload_release_asset draft: false
# uses: actions/upload-release-asset@v1.0.2 prerelease: false
# env: - name: Upload Release Asset
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} id: upload_release_asset
# with: uses: actions/upload-release-asset@v1.0.2
# upload_url: ${{ steps.create_release.outputs.upload_url }} env:
# asset_path: ./Release.zip GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# asset_name: Release.zip with:
# asset_content_type: application/zip upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./package.zip
asset_name: package.zip
asset_content_type: application/zip