Skip to content

release.ymlを修正 #5

release.ymlを修正

release.ymlを修正 #5

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
determine-version:
runs-on: windows-latest
outputs:
semVer: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Nerdbank.GitVersioning
id: nbgv
uses: dotnet/[email protected]
build-executable:
needs: [determine-version]
runs-on: windows-latest
strategy:
matrix:
rid: [linux_x64, win_x64]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Restore
run: ./build.cmd Restore
- name: Publish
run: ./build.cmd Publish --runtime ${{matrix.rid}} --skip Restore
- name: Zip
run: ./build.cmd Zip --runtime ${{matrix.rid}} --skip Publish
- name: Save
uses: actions/upload-artifact@v3
with:
name: beutl-${{matrix.rid}}-${{needs.determine-version.outputs.semVer}}
path: ./artifacts/*.zip
build-nuget:
needs: [determine-version]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Restore
run: ./build.cmd Restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Pack
run: dotnet pack --no-build -c Release --output ../../artifacts
working-directory: ./packages/Beutl.Sdk
- name: Save
uses: actions/upload-artifact@v3
with:
name: Beutl.Sdk.${{needs.determine-version.outputs.semVer}}
path: ./artifacts/Beutl.Sdk.${{needs.determine-version.outputs.semVer}}.nupkg
create-release:
needs: [build-executable, build-nuget]
runs-on: windows-latest
steps:
- uses: actions/download-artifact@v3
with:
path: artifacts
- uses: actions/create-release@v1
id: create_release
with:
artifacts: "artifacts/**/*.zip,artifacts/**/*.nupkg"
draft: true
prerelease: false
makeLatest: true
generateReleaseNotes: true