-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autobuild and upload program when a release published
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
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,31 @@ | ||
name: Publish Executable on Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .Net 6.0 | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '6.0' | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Publish program into build folder | ||
run: dotnet publish winsocat -c Release -o build | ||
- name: Zip build folder | ||
run: 7z a -tzip winsocat.zip build | ||
- name: Upload program | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
upload_url: ${{github.event.release.upload_url}} | ||
asset_path: ./winsocat.zip | ||
asset_name: winsocat.zip | ||
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