diff --git a/.github/workflows/beta-package.yml b/.github/workflows/beta-package.yml new file mode 100644 index 0000000..567903d --- /dev/null +++ b/.github/workflows/beta-package.yml @@ -0,0 +1,26 @@ +name: Publish Beta Package + +on: + workflow_dispatch: + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + - name: Install dependencies + run: dotnet restore ./source/Lexicala.NET.slnx + - name: Build + run: dotnet build ./source/Lexicala.NET.slnx --configuration Release --no-restore + - name: Test + run: dotnet test ./source/Lexicala.NET.slnx --no-restore --verbosity normal + - name: Pack + run: dotnet pack ./source/Lexicala.NET/Lexicala.NET.csproj --configuration Release --no-build --version-suffix "beta.${{ github.run_number }}" --output ./artifacts + - name: Publish to NuGet + run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml index f39e0f7..0774443 100644 --- a/.github/workflows/build-on-push.yml +++ b/.github/workflows/build-on-push.yml @@ -2,7 +2,7 @@ name: Build & Test on: push: - paths-ignore: ['**.md'] + paths-ignore: ['**.md', '.github/**'] # don't run on master because we already have another action for that branches-ignore: [master] diff --git a/.github/workflows/build-test_pull-request.yml b/.github/workflows/build-test_pull-request.yml index f37afba..76de43d 100644 --- a/.github/workflows/build-test_pull-request.yml +++ b/.github/workflows/build-test_pull-request.yml @@ -1,9 +1,9 @@ -name: Build & Test +name: Build & Test Pull Request on: pull_request: branches: [ master ] - + paths-ignore: ['**.md', '.github/**'] jobs: build: diff --git a/.github/workflows/package-main.yml b/.github/workflows/package-main.yml index 5b0acd7..372ceaf 100644 --- a/.github/workflows/package-main.yml +++ b/.github/workflows/package-main.yml @@ -3,7 +3,7 @@ name: Build Test Package on: push: branches: [ master ] - paths-ignore: ['**.md'] + paths-ignore: ['**.md', '.github/**'] jobs: build: @@ -22,8 +22,7 @@ jobs: run: dotnet build ./source/Lexicala.NET.slnx --configuration Release --no-restore - name: Test run: dotnet test ./source/Lexicala.NET.slnx --no-restore --verbosity normal - - name: Publish to Nuget - uses: alirezanet/publish-nuget@v3.0.4 - with: - PROJECT_FILE_PATH: ./source/Lexicala.NET/Lexicala.NET.csproj - NUGET_KEY: ${{secrets.NUGET_API_KEY}} + - name: Pack + run: dotnet pack ./source/Lexicala.NET/Lexicala.NET.csproj --configuration Release --no-build --output ./artifacts + - name: Publish to NuGet + run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate diff --git a/source/Lexicala.NET/Lexicala.NET.csproj b/source/Lexicala.NET/Lexicala.NET.csproj index debe416..78644f3 100644 --- a/source/Lexicala.NET/Lexicala.NET.csproj +++ b/source/Lexicala.NET/Lexicala.NET.csproj @@ -17,7 +17,7 @@ A .NET client for the Lexicala api. See readme file on project page for further details. - 3.1.0 + 3.2.0 latest