Commit Graph

3 Commits

Author SHA1 Message Date
offhub 662f953ca6
Update hash.yml 2024-11-04 14:19:45 +03:00
isaak654 6db09a9e7e
Typo fix 2024-09-30 16:16:52 +02:00
offhub b8a7704eca
Add Workflow for SHA256 Hash Calculation on Releases
GitHub Actions Workflow: Hash Released Files

This workflow automates the management of release asset hashes whenever a new release is published or edited. Here's an overview of its functionality:

    Trigger: The workflow is triggered by the publication or editing of a release in the specified repository.

    Download Assets: It downloads all assets associated with the release from GitHub.

    Check for Downloaded Assets: Before calculating hashes, the workflow checks if any assets were successfully downloaded. If no assets are found, it sets an environment variable to skip subsequent steps.

    Calculate SHA256 Hashes: If assets are downloaded, the workflow calculates the SHA256 hash for each asset and saves these hashes in a file named sha256-checksums.txt.

    Check Existing Hash File: The workflow checks for an existing version of the hash file. If found, it compares the new hash file to the existing one.

    Conditional Upload:
        If the hashes match, it skips the upload process.
        If the hashes differ, it deletes the existing hash file asset and uploads the new one.

This workflow ensures that each release includes an up-to-date hash file, enabling users to verify the integrity of downloaded assets efficiently.
2024-09-21 20:57:11 +03:00