Fix YAML
All checks were successful
/ build (push) Successful in 2m14s

This commit is contained in:
2025-03-18 13:30:45 +13:00
parent 3d67deeed3
commit 7488aa8ae6
2 changed files with 41 additions and 49 deletions

View File

@@ -1,31 +1,26 @@
on:
push:
branches:
- master
- master
pull_request:
branches:
- master
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --configuration Release --no-build
- name: Upload artifacts
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --configuration Release --no-build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Build
path: ${{ github.workspace }}
path: ${{ github.workspace }}

View File

@@ -1,38 +1,35 @@
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- v[0-9]+.[0-9]+.[0-9]+
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Verify commit exists in origin/master
run: >
git fetch --no-tags --prune --depth=1 origin
+refs/heads/*:refs/remotes/origin/*
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Verify commit exists in origin/master
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/master
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
- name: Push
run: dotnet nuget push CSSUDII.Sodium.Interop.${VERSION}.nupkg --source https://nexus.119.224.65.18.sslip.io/repository/nuget/index.json --api-key ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
git branch --remote --contains | grep origin/master
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build
--output .
- name: Push
run: dotnet nuget push CSSUDII.Sodium.Interop.${VERSION}.nupkg --source
https://nexus.119.224.65.18.sslip.io/repository/nuget/index.json
--api-key ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}