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: Release | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
VERSION_TAG: JPKv0_0_1 | |
VERSION: '0.0.1' | |
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: 9.0.x | |
- name: Create the app package | |
run: dotnet publish JpkHelper -p:ApplicationVersion=${{ env.VERSION }} -p:ApplicationDisplayVersion=${{ env.VERSION }} -f net9.0 -o out -c Release -r win7-x64 | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: JpkHelper | |
path: out/JpkHelper.exe | |
- uses: actions/create-release@v1 | |
id: create_release | |
with: | |
draft: false | |
prerelease: false | |
release_name: ${{ env.VERSION_TAG }} | |
tag_name: ${{ env.VERSION_TAG }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: out/JpkHelper.exe | |
asset_name: JpkHelper.exe | |
asset_content_type: application/vnd.microsoft.portable-executable |