Skip to content

Add GitHub Actions release workflow (workflow_dispatch)#17

Merged
Halcyonhal9 merged 3 commits into
mainfrom
copilot/add-github-action-for-builds
Apr 14, 2026
Merged

Add GitHub Actions release workflow (workflow_dispatch)#17
Halcyonhal9 merged 3 commits into
mainfrom
copilot/add-github-action-for-builds

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Replicates build.ps1 -Release as a GitHub Action triggered via workflow_dispatch, enabling releases from the GitHub mobile app.

Workflow inputs

  • version_bump: patch (default) / minor / major — computes next version from latest git tag
  • publish_to_gallery: boolean, defaults to true

Pipeline steps

  • Runs unit tests before building
  • Builds all 4 RIDs (win-x64, linux-x64, linux-arm64, osx-arm64) + RID-neutral gallery build
  • Stages module files, creates per-platform release zips
  • Commits manifest version bump, tags, pushes (idempotent — safe to re-run on partial failures)
  • Creates GitHub Release with zip assets (falls back to gh release upload --clobber if release already exists)
  • Optionally publishes to PSGallery via POWERSHELL_GALLERY_API_KEY from the CopilotCmdletsEnv environment

Hardening

  • Concurrency control: concurrency: { group: release, cancel-in-progress: false } prevents race conditions from simultaneous dispatches
  • Idempotent tag/release: Checks for existing tags before creating, and uploads assets to existing releases instead of failing — matches build.ps1 behavior
  • Unit test gate: Runs dotnet test --filter "Category=Unit" before proceeding to platform builds

@Halcyonhal9
Copy link
Copy Markdown
Owner

@copilot /pr

Copilot AI and others added 2 commits April 14, 2026 06:38
- Fix typo in environment name (CopilotCmldetsEnv -> CopilotCmdletsEnv)
- Remove unused $version variable in Create GitHub Release step
- Remove redundant zip pre-delete (Compress-Archive -Force handles overwrite)
- Simplify if: expression by removing unnecessary ${{ }} wrapper

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Halcyonhal9 <123903683+Halcyonhal9@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 14, 2026

@copilot /pr

Ran the full PR workflow. Here's the summary:

Phase Status Details
PR created Already existed PR #17
Code simplified Done Removed unused variable, redundant pre-delete, fixed if: expression (b5db473)
Code review Done 3 issues found: missing idempotency, no concurrency control, no test step
Feedback addressed Done All 3 addressed in 356d073

Changes made:

  • Added concurrency: { group: release, cancel-in-progress: false } to prevent race conditions
  • Added Run unit tests step before build
  • Made tag creation idempotent (checks git tag --list before tagging, matching build.ps1)
  • Made release creation idempotent (falls back to gh release upload --clobber if release exists, matching build.ps1)

Build passes, all 120 unit tests pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh auth status (http block)
    • Triggering command: /usr/bin/gh gh pr review 17 --comment --body test de/node/bin/bash (http block)
    • Triggering command: /usr/bin/gh gh pr comment 17 --body test review comment (http block)
  • https://api.github.com/repos/Halcyonhal9/ghcp-powershell
    • Triggering command: /usr/bin/gh gh api /repos/Halcyonhal9/ghcp-powershell --jq .permissions (http block)
    • Triggering command: /usr/bin/gh gh api /repos/Halcyonhal9/ghcp-powershell (http block)
    • Triggering command: /usr/bin/curl curl -s -H Authorization: token ****** REDACTED (http block)
  • https://api.github.com/repos/Halcyonhal9/ghcp-powershell/pulls/17/reviews
    • Triggering command: `/usr/bin/gh gh api --method POST -H Accept: application/vnd.github+json /repos/Halcyonhal9/ghcp-powershell/pulls/17/reviews -f event=COMMENT -f body=## Code Review Summary

Solid workflow that faithfully replicates the build.ps1 -Release pipeline as a workflow_dispatch action. The structure is clean, inputs are well-defined, and the per-RID build + gallery publish approach is correct. A few i git conf�� get --global tnet/tools/git http.https://gitbash` (http block)

  • Triggering command: /usr/bin/gh gh api --method POST -H Accept: application/vnd.github&#43;json /repos/Halcyonhal9/ghcp-powershell/pulls/17/reviews --input - (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from Halcyonhal9 April 14, 2026 06:53
@Halcyonhal9 Halcyonhal9 marked this pull request as ready for review April 14, 2026 12:24
Comment thread .github/workflows/release.yml Outdated
jobs:
release:
runs-on: ubuntu-latest
environment: CopilotCmldetsEnv
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is a typo. It should be CopilotCmdletsEnv

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot Fix this typo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Already fixed in b5db473CopilotCmldetsEnvCopilotCmdletsEnv.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Already fixed in b5db473CopilotCmldetsEnvCopilotCmdletsEnv.

@Halcyonhal9 Halcyonhal9 merged commit a9d73a0 into main Apr 14, 2026
1 check passed
@Halcyonhal9 Halcyonhal9 deleted the copilot/add-github-action-for-builds branch April 20, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants