Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated build steps and add pull request trigger #1

Merged
merged 3 commits into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '*'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+.*'
pull_request:
workflow_dispatch:

env:
Expand All @@ -19,12 +20,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }} # This checks out the commit that triggered the workflow run

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet pack Npgmq/Npgmq.csproj --no-build --configuration Release /p:PackageVersion=${{ env.VERSION }} /p:CopyrightYear=$(date +%Y) --output out

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
name: build-artifact
Expand All @@ -65,13 +66,13 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: build-artifact
path: out

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

Expand Down