Skip to content

Commit

Permalink
[Fix] Fixed (well... theoretically) the Release workflow (see CONTRIB…
Browse files Browse the repository at this point in the history
…UTING.md for some info).

[Improvement] Updated CONTRIBUTING.md.
  • Loading branch information
wokhan committed Jan 5, 2021
1 parent fe41854 commit 93d43f6
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 109 deletions.
107 changes: 0 additions & 107 deletions .github/workflows/beta.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Release (Beta / Stable)

on:
release:
types: [created]

jobs:
publish-anycpu:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Build and publish
run: dotnet publish -c Release
- name: Zip published files
run: compress-archive -path ./bin/net5.0-windows/publish/* -destinationpath ./bin/net5.0-windows/wfn.zip
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./bin/net5.0-windows/wfn.zip
asset_name: wfn-${{ steps.get_release.outputs.tag_name }}.zip
asset_content_type: application/zip
publish-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Build and publish
run: dotnet publish -r win-x64 -c Release --self-contained true
- name: Zip published files
run: compress-archive -path ./bin/net5.0-windows/win-x64/publish/* -destinationpath ./bin/net5.0-windows/wfn-x64.zip
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./bin/net5.0-windows/wfn-x64.zip
asset_name: wfn-x64-standalone-${{ steps.get_release.outputs.tag_name }}.zip
asset_content_type: application/zip
publish-x86:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Build and publish
run: dotnet publish -r win-x86 -c Release --self-contained true
- name: Zip published files
run: compress-archive -path ./bin/net5.0-windows/win-x86/publish -destinationpath ./bin/net5.0-windows/wfn-x86.zip
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./bin/net5.0-windows/wfn-x86.zip
asset_name: wfn-x86-standalone-${{ steps.get_release.outputs.tag_name }}.zip
asset_content_type: application/zip

19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Some rules apply, of course...

Any IDE would do as long as conventions are followed.

The best one being Visual Studio (Community is way enough) 2019.
The best one being Visual Studio (Community is way enough) 2019 (last update to support .NET 5.0).

You can use the latest update, but avoid any preview as they're not production ready.

Expand All @@ -52,3 +52,20 @@ New features: ***feature**/my_new_feature*
Bug fixing on official releases: *2.1/**bugfix**/short_description*

A review is then required to merge with master.

### Nightlies

Nightlies will be automatically compiled on each push / merge on the master branch, and will always be uploaded in the same "Nightly" Release.

### Releases

Releases can be created the standard way through GitHub Releases feature.

WFN will be compiled once a release is created, and named according to the tag name which must reflect the current version (ex : if the tag/release name is v2.0.0-beta, the asset will be named wfn-[x64|x86]{-standalone}-v2.0.0-beta.zip).

So you don't have to compile locally and upload your assets: it will be done automatically by the "Release" GitHub action.

Note that three packages will be created:
- one for x64 (standalone)
- one for x86 (standalone)
- one for AnyCPU (requires .NET to be installed on the client computer)
2 changes: 1 addition & 1 deletion WindowsFirewallNotifier.sln
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{1DBB954C-E22
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github-actions", "github-actions", "{573DABCD-1C81-465A-AD08-41F109761D74}"
ProjectSection(SolutionItems) = preProject
.github\workflows\beta.yml = .github\workflows\beta.yml
.github\workflows\nightly.yml = .github\workflows\nightly.yml
.github\workflows\release.yml = .github\workflows\release.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "legal", "legal", "{28683BDB-380A-4B87-AC28-142192543EEB}"
Expand Down

0 comments on commit 93d43f6

Please sign in to comment.