refactor(ci): simplify CI workflow to Linux-only builds
Remove Windows and macOS build jobs from CI workflow since this is a Linux-specific MAUI implementation. Consolidate artifact uploads to single "nuget-packages" artifact. Fix release workflow to use Gitea-specific variables (GITEA_REF, gitea.repository_owner) instead of GitHub equivalents, and use GITEATOKEN secret for package publishing.
This commit is contained in:
@@ -35,57 +35,5 @@ jobs:
|
||||
- name: Upload NuGet packages
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nuget-packages-linux
|
||||
path: ./nupkg/*.nupkg
|
||||
|
||||
build-windows:
|
||||
name: Build (Windows)
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test --configuration Release --no-build --verbosity normal
|
||||
continue-on-error: true
|
||||
|
||||
- name: Pack NuGet
|
||||
run: dotnet pack --configuration Release --no-build -o ./nupkg
|
||||
|
||||
- name: Upload NuGet packages
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nuget-packages-windows
|
||||
path: ./nupkg/*.nupkg
|
||||
|
||||
build-macos:
|
||||
name: Build (macOS)
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test --configuration Release --no-build --verbosity normal
|
||||
continue-on-error: true
|
||||
|
||||
- name: Pack NuGet
|
||||
run: dotnet pack --configuration Release --no-build -o ./nupkg
|
||||
|
||||
- name: Upload NuGet packages
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nuget-packages-macos
|
||||
name: nuget-packages
|
||||
path: ./nupkg/*.nupkg
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Get version from tag
|
||||
id: version
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
VERSION=${GITEA_REF#refs/tags/v}
|
||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Building version: $VERSION"
|
||||
|
||||
@@ -50,8 +50,8 @@ jobs:
|
||||
run: |
|
||||
for pkg in ./nupkg/*.nupkg; do
|
||||
dotnet nuget push "$pkg" \
|
||||
--api-key ${{ secrets.GITHUB_TOKEN }} \
|
||||
--source https://git.marketally.com/api/packages/${{ github.repository_owner }}/nuget/index.json \
|
||||
--api-key ${{ secrets.GITEATOKEN }} \
|
||||
--source https://git.marketally.com/api/packages/${{ gitea.repository_owner }}/nuget/index.json \
|
||||
--skip-duplicate
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user