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

@@ -5,25 +5,20 @@ on:
pull_request: pull_request:
branches: branches:
- master - master
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup dotnet - name: Setup dotnet
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: '8.0.x' dotnet-version: 8.0.x
- name: Build - name: Build
run: dotnet build --configuration Release run: dotnet build --configuration Release
- name: Test - name: Test
run: dotnet test --configuration Release --no-build run: dotnet test --configuration Release --no-build
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:

View File

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