Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Create GitHub Release #64

Create GitHub Release

Create GitHub Release #64

name: Create GitHub Release
on:
workflow_run:
workflows: ["tests"]
branches: [main]
types:
- completed
jobs:
create-github-release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build Windows X64
run: dotnet publish --configuration Release --self-contained -r win-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:Version=1.0.${{ github.run_number }} -o build-win-x64 ./Wasari.Cli/Wasari.Cli.csproj
- name: Build Linux X64
run: dotnet publish --configuration Release --self-contained -r linux-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:Version=1.0.${{ github.run_number }} -o build-linux-x64 ./Wasari.Cli/Wasari.Cli.csproj
- name: Create versioned release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ github.run_number }}"
prerelease: false
title: 'Build #${{ github.run_number }}'
files: |
build-win-x64/Wasari.Cli.exe
build-linux-x64/Wasari.Cli
- name: Create latest release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: 'Build #${{ github.run_number }}'
files: |
build-win-x64/Wasari.Cli.exe
build-linux-x64/Wasari.Cli