-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rework ci for release + update readme
- Loading branch information
Showing
4 changed files
with
90 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,82 @@ | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ develop, master ] | ||
jobs: | ||
build-and-test: | ||
name: Buid and test application | ||
runs-on: ubuntu-latest | ||
container: | ||
image: mcr.microsoft.com/dotnet/sdk:6.0 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --no-restore | ||
- name: Test | ||
run: dotnet test --no-build --verbosity normal | ||
build-linux-deb: | ||
name: Build, Test and compile executable on Linux | ||
runs-on: ubuntu-latest | ||
container: | ||
image: mcr.microsoft.com/dotnet/sdk:6.0 | ||
needs: [build-and-test] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dotnet deb | ||
run: | | ||
cd src/PandocGui | ||
dotnet tool install --global dotnet-deb | ||
export PATH="$PATH:/github/home/.dotnet/tools" | ||
dotnet deb install | ||
- name: Build deb package | ||
run: | | ||
cd src/PandocGui | ||
export PATH="$PATH:/github/home/.dotnet/tools" | ||
dotnet deb -c Release -f net6.0 -o dist/linux-x64 | ||
- name: Save deb package as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pandoc-gui-deb | ||
path: src/PandocGui/dist/linux-x64/ | ||
|
||
build-windows-installer: | ||
name: Build, Test and publish executable on windows | ||
runs-on: windows-latest | ||
needs: [build-and-test] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build Executable | ||
run: cd src/PandocGui && dotnet publish --runtime win-x64 --configuration Release -p:PublishSingleFile=true --self-contained true --output C:\temp\pandocgui | ||
- name: Compile Installer | ||
run: iscc installers/windows/installer.iss /dBuildNumber=${{github.run_number}} /dMyAppURL=https://github.com/${{github.repository}} | ||
- name: Save Installer as Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pandoc-gui-setup | ||
path: C:\temp\pandocgui\pandoc-gui-setup.exe | ||
|
||
create-release: | ||
name: Create a release for with artifacts | ||
needs: [build-and-test,build-linux-deb,build-windows-installer] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: pandoc-gui-deb | ||
path: linux | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: pandoc-gui-setup | ||
path: windows | ||
- name: Build | ||
run: echo ${{ github.sha }} > Release.txt | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
Release.txt | ||
linux/PandocGui.1.0.0.deb | ||
windows/pandoc-gui-setup.exe |
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