Skip to content

Commit

Permalink
chore: Update action files
Browse files Browse the repository at this point in the history
  • Loading branch information
Yushu2606 committed Feb 18, 2024
1 parent 6254ec9 commit 9790033
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:

env:
BUILD_TYPE: Release
DOTNET_VERSION: 8
ASSEMBLY_NAME: Hosihikari.FastElfQuery

jobs:
build:
Expand All @@ -18,12 +20,13 @@ jobs:
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: 8.0.x
dotnet-version: ${{ env.DOTNET_VERSION }}.0.x

- name: Build
run: dotnet publish -c ${{env.BUILD_TYPE}}
run: dotnet publish -c ${{ env.BUILD_TYPE }}

- name: Upload Artifact
uses: actions/[email protected]
with:
name: ${{ env.ASSEMBLY_NAME }}.${{ github.sha }}
path: src/bin
20 changes: 8 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Release
on:
workflow_dispatch:
inputs:
version:
required: true
description: Version (like v1.0.0)
prerelease:
type: boolean
required: true
Expand All @@ -26,23 +23,22 @@ jobs:
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: ${{env.DOTNET_VERSION}}.0.x
dotnet-version: ${{ env.DOTNET_VERSION }}.0.x

- name: Build
run: dotnet publish -c ${{env.BUILD_TYPE}}
run: dotnet publish -c ${{ env.BUILD_TYPE }}

- name: Publish NuGet
uses: alirezanet/[email protected]
with:
PROJECT_FILE_PATH: src/${{env.ASSEMBLY_NAME}}.csproj
VERSION_STATIC: ${{ github.event.inputs.version }}
PROJECT_FILE_PATH: src/${{ env.ASSEMBLY_NAME }}.csproj
VERSION_FILE_PATH: Directory.Build.props
TAG_COMMIT: false
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
NO_BUILD: true

- name: Create New Release
uses: ncipollo/[email protected]
- name: Upload Artifact
uses: actions/[email protected]
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag: ${{ github.event.inputs.version }}
artifacts: src/bin/Release/net${{env.DOTNET_VERSION}}.0/publish/${{env.ASSEMBLY_NAME}}.dll
name: ${{ env.ASSEMBLY_NAME }}.Publish
path: src/bin/Release/net${{env.DOTNET_VERSION}}.0/publish/

0 comments on commit 9790033

Please sign in to comment.