doc: update readme file #18
Workflow file for this run
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
name: Build and Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Release] | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
env: | |
Solution_Name: ResizeImages.sln | |
#Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. | |
#Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. | |
#Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj. | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 7.0.x | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
# - name: Setup MSBuild.exe | |
# uses: microsoft/[email protected] | |
# Execute all unit tests in the solution | |
#- name: Execute unit tests | |
# run: dotnet test | |
# Restore the application to populate the obj folder with RuntimeIdentifiers | |
# - name: Restore the application | |
# run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration | |
# env: | |
# Configuration: ${{ matrix.configuration }} | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build project | |
run: dotnet build --configuration release --output ./publish/win-x64 | |
# - name: Publish application | |
# run: dotnet publish -c release -r win-x64 --output ./publish/win-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true | |
- name: see directory | |
run: dir "publish/win-x64" | |
- name: Compress files | |
run: | | |
7z a ResizeIt.zip "publish/win-x64/*" | |
- name: see directory | |
run: dir | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# tag_name: ${{ github.ref }} | |
# release_name: Release ${{ github.ref }} | |
# # body: | | |
# # Changes in this release: | |
# # - Add feature X | |
# # - Fix issue Y | |
# body: | | |
# #${{ github.ref }} | |
# ![](https://img.shields.io/github/downloads/heliomarpm/resize-comics/${{ github.ref }}/total) | |
# draft: true | |
# prerelease: true | |
# # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact | |
# - name: Upload build artifacts | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: ResizeIt | |
# path: ResizeIt.zip | |
# - name: Set Variables | |
# id: vars | |
# run: | | |
# echo "::set-output name=release_date::$(date +%b,\ %d\ %Y)" | |
- name: Set Variables | |
id: variables | |
run: | | |
echo "release_date=$(date +'%b, %d %Y')" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: | | |
###### ${{ steps.variables.outputs.release_date }} | |
![](https://img.shields.io/github/downloads/heliomarpm/resize-comics/${{ github.ref_name }}/total) | |
draft: true | |
prerelease: true | |
files: | | |
ResizeIt.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |