-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Upload release | ||
|
||
on: | ||
release: | ||
types: [ "published" ] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install jq | ||
uses: dcarbone/[email protected] | ||
|
||
- 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: Build the solution | ||
run: dotnet build "WMCCModules.sln" -c Release | ||
|
||
- name: Extract current version | ||
id: get-version | ||
run: | | ||
version=$(jq -r '.version' plugin_template/swinfo.json) | ||
echo "Version is $version" | ||
echo "version=$version" >> $GITHUB_ENV | ||
echo "artifact_name=WMCCModules-$version.zip" >> $GITHUB_ENV | ||
echo "zip=$(ls -1 dist/WMCCModules-*.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 | ||
uses: shogo82148/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ env.upload_url }} | ||
asset_path: ${{ env.zip }} | ||
asset_name: ${{ env.artifact_name }} | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters