Skip to content

[WIP] Add GitHub Actions workflow for creating release zip#2

Merged
zonemaster60 merged 1 commit into
masterfrom
copilot/add-github-actions-release-zip
Nov 17, 2025
Merged

[WIP] Add GitHub Actions workflow for creating release zip#2
zonemaster60 merged 1 commit into
masterfrom
copilot/add-github-actions-release-zip

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 17, 2025

Plan to add GitHub Actions workflow for creating release zip:

  • Create .github/workflows directory structure
  • Create create-release-zip.yml workflow file with:
    • Manual trigger (workflow_dispatch)
    • Tag push trigger (v* pattern)
    • Checkout repository step
    • Create zip of Handy2ClickAutoFixer folder
    • Upload zip as release artifact
    • Name zip using tag name or fallback
  • Test workflow syntax (validate YAML)
  • Run code review
  • Run security checks
Original prompt

Add a GitHub Actions workflow that creates a zip of the Handy2ClickAutoFixer folder and attaches it to a GitHub Release. Create a new workflow file at .github/workflows/create-release-zip.yml with the exact contents below. The workflow must:

  • Be triggerable manually (workflow_dispatch) and when tags are pushed (tags matching v*).
  • Check out the repository, create a zip archive containing the Handy2ClickAutoFixer directory (preserve directory structure), name the zip using the tag name when available or a fallback release- when triggered manually.
  • Create or use a GitHub release with the chosen tag name and upload the zip as a release asset.
  • Use the built-in GITHUB_TOKEN so no extra secrets are required.
  • Run on ubuntu-latest.

Workflow file content (use exactly as-is):

name: Create release zip for Handy2ClickAutoFixer

on:
  workflow_dispatch:
  push:
    tags:
      - 'v*'

jobs:
  build-and-release:
    runs-on: ubuntu-latest

    steps:
      - name: Check out repository
        uses: actions/checkout@v4

      - name: Determine release tag
        id: tag
        run: |
          if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
            TAG_NAME="${GITHUB_REF#refs/tags/}"
          else
            TAG_NAME="release-${GITHUB_RUN_NUMBER}"
          fi
          echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT

      - name: Create zip archive
        run: |
          mkdir -p release
          ZIP_NAME="Handy2ClickAutoFixer-${{ steps.tag.outputs.tag_name }}.zip"
          if [ -d "Handy2ClickAutoFixer" ]; then
            zip -r "release/${ZIP_NAME}" "Handy2ClickAutoFixer"
          else
            echo "Error: Handy2ClickAutoFixer folder not found in repository root" >&2
            exit 1
          fi
          echo "zip_path=release/${ZIP_NAME}" >> $GITHUB_OUTPUT

      - name: Create GitHub release
        id: create_release
        uses: actions/create-release@v1
        with:
          tag_name: ${{ steps.tag.outputs.tag_name }}
          release_name: "${{ steps.tag.outputs.tag_name }}"
          draft: false
          prerelease: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Upload release asset (zip)
        uses: actions/upload-release-asset@v1
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ${{ steps.tag.outputs.zip_path || steps.create_release.outputs.upload_url }}
          asset_name: ${{ steps.tag.outputs.tag_name }}-Handy2ClickAutoFixer.zip
          asset_content_type: application/zip
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Output release details
        run: |
          echo "Created release: ${{ steps.create_release.outputs.upload_url }}"

Notes and acceptance criteria:

  • The PR should add only the new workflow file.
  • If Handy2ClickAutoFixer is missing from the repo root the workflow will fail; that's acceptable but the workflow must check for the folder and fail clearly.
  • The workflow should be triggerable manually and on tag pushes 'v*'.

Please open a pull request that adds this workflow file to the default branch of the repository. The pull request title should match the problem title and include a short description in the PR body explaining what the workflow does and how to use it (trigger manually via Actions -> Run workflow, or push a tag like v1.0.0 to create a release automatically).

This pull request was created as a result of the following prompt from Copilot chat.

Add a GitHub Actions workflow that creates a zip of the Handy2ClickAutoFixer folder and attaches it to a GitHub Release. Create a new workflow file at .github/workflows/create-release-zip.yml with the exact contents below. The workflow must:

  • Be triggerable manually (workflow_dispatch) and when tags are pushed (tags matching v*).
  • Check out the repository, create a zip archive containing the Handy2ClickAutoFixer directory (preserve directory structure), name the zip using the tag name when available or a fallback release- when triggered manually.
  • Create or use a GitHub release with the chosen tag name and upload the zip as a release asset.
  • Use the built-in GITHUB_TOKEN so no extra secrets are required.
  • Run on ubuntu-latest.

Workflow file content (use exactly as-is):

name: Create release zip for Handy2ClickAutoFixer

on:
  workflow_dispatch:
  push:
    tags:
      - 'v*'

jobs:
  build-and-release:
    runs-on: ubuntu-latest

    steps:
      - name: Check out repository
        uses: actions/checkout@v4

      - name: Determine release tag
        id: tag
        run: |
          if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
            TAG_NAME="${GITHUB_REF#refs/tags/}"
          else
            TAG_NAME="release-${GITHUB_RUN_NUMBER}"
          fi
          echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT

      - name: Create zip archive
        run: |
          mkdir -p release
          ZIP_NAME="Handy2ClickAutoFixer-${{ steps.tag.outputs.tag_name }}.zip"
          if [ -d "Handy2ClickAutoFixer" ]; then
            zip -r "release/${ZIP_NAME}" "Handy2ClickAutoFixer"
          else
            echo "Error: Handy2ClickAutoFixer folder not found in repository root" >&2
            exit 1
          fi
          echo "zip_path=release/${ZIP_NAME}" >> $GITHUB_OUTPUT

      - name: Create GitHub release
        id: create_release
        uses: actions/create-release@v1
        with:
          tag_name: ${{ steps.tag.outputs.tag_name }}
          release_name: "${{ steps.tag.outputs.tag_name }}"
          draft: false
          prerelease: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Upload release asset (zip)
        uses: actions/upload-release-asset@v1
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ${{ steps.tag.outputs.zip_path || steps.create_release.outputs.upload_url }}
          asset_name: ${{ steps.tag.outputs.tag_name }}-Handy2ClickAutoFixer.zip
          asset_content_type: application/zip
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Output release details
        run: |
          echo "Created release: ${{ steps.create_release.outputs.upload_url }}"

Notes and acceptance criteria:

  • The PR should add only the new workflow file.
  • If Handy2ClickAutoFixer is missing from the repo root the workflow will fail; that's acceptable but the workflow must check for the folder and fail clearly.
  • The workflow should be triggerable manually and on tag pushes 'v*'.

Please open a pull request that adds this workflow file to the default branch of the repository. The pull request title should match the problem title and include a short description in the PR body explaining what the workflow does and how to use it (trigger manually via Actions -> Run workflow, or push a tag like v1.0.0 to create a release automatically).


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@zonemaster60 zonemaster60 marked this pull request as ready for review November 17, 2025 15:45
@zonemaster60 zonemaster60 merged commit 6379b6d into master Nov 17, 2025
1 check failed
Copilot AI requested a review from zonemaster60 November 17, 2025 15:46
@zonemaster60
Copy link
Copy Markdown
Owner

Release package Handy2ClickAutoFixer created

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