Skip to content

Migrate part of CI to GitHub Actions - #22233

Open
MrJul wants to merge 10 commits into
mainfrom
feature/gh-actions
Open

MrJul wants to merge 10 commits into
mainfrom
feature/gh-actions

Conversation

@MrJul

@MrJul MrJul commented Sep 14, 2026

Copy link
Copy Markdown
Member

What does the pull request do?

This PR migrates part of our CI infrastructure from Azure Pipelines to GitHub Actions.

Build, unit tests and package publishing are affected: this corresponds to the Avalonia - Unit tests pipeline.
Integration tests are still on Azure for now.

Notes

  • The scenario "build + tests + publish nightly" works, see https://github.com/AvaloniaUI/Avalonia/actions/runs/34860254620.
  • Publishing a package from a PR is untested for now, as it can't be triggered until it's merged to main. The publishing part is shared between all workflows, so I'm hopeful it should work. Further adjustments might still be needed, though.
  • The workflow run number set by GitHub Actions is auto-incremented and can't be changed, so 100000 is added to that number to get build numbers that don't overlap with the existing ones.

@MrJul MrJul added enhancement area-infrastructure Issues related to CI/tooling infrastructur labels Sep 14, 2026
@MrJul

MrJul commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

Note that immediate run failures are expected in Azure Pipelines for this PR because its support has been removed.

Comment thread .github/workflows/build.yml
Comment on lines +43 to +44
dotnet-version: 8.0.x
global-json-file: global.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for both dotnet-version and global-json-file?
We only need to install latest SDK we need. Any extra runtimes are already preinstalled, like .NET 8 runtime.

Comment on lines +165 to +178
runs-on: ubuntu-24.04
environment: release
steps:
- name: Approved
run: echo "Release publishing approved for run $GITHUB_RUN_ID"

publish-release:
name: Publish Release NuGet Packages
needs: approve-release
uses: ./.github/workflows/publish-nuget-shared.yml
with:
feed-url: ${{ vars.RELEASE_MANAGER_UPLOAD_URL }}
secrets:
api-key: ${{ secrets.RELEASE_MANAGER_API_KEY }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's wrong.
approve-release has environment: release on it, so it has to be approved.
But secrets.RELEASE_MANAGER_API_KEY secret is not protected by this environment, and would have to be defined on the whole repository, not just environment.

Instead, RELEASE_MANAGER_API_KEY should be only defined on the release env, and only be accessed from CI jobs marked with environment: release (so publish-release needs to be marked).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve-release is probably unnecessary in this case. publish-release needs to require an approve.

actions: read

concurrency:
group: publish-pr-nuget-${{ github.event.workflow_run.event }}-${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have concurrency defined on build, but not sure about nuget publish. It might end up with some packages published, and other not.

@maxkatz6

Copy link
Copy Markdown
Member

azure-pipelines.yml is still there in the branch, unless it's expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Issues related to CI/tooling infrastructur enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants