Skip to content

HideVAB 0.1.0

HideVAB 0.1.0 #1

Workflow file for this run

name: Upload release
on:
release:
types: [ "published" ]
jobs:
publish:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download NuGet
id: download-nuget
run: |
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- name: Install jq
uses: dcarbone/[email protected]
- name: Build the solution
run: |
version=$(jq -r '.version' plugin_template/swinfo.json)
echo "Version is $version"
dotnet build "HideVAB.sln" -c Release
echo "release_filename=HideVAB-$version.zip" >> $GITHUB_ENV
echo "zip=$(ls -1 dist/HideVAB-*.zip | head -n 1)" >> $GITHUB_ENV
echo "upload_url=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].upload_url' | tr -d \")" >> $GITHUB_ENV
- name: Upload zip to release
uses: shogo82148/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.upload_url }}
asset_path: ${{ env.zip }}
asset_name: ${{ env.release_filename }}
asset_content_type: application/zip