Skip to content

Commit

Permalink
remove .tgz archive, exclude some additional files from release zips
Browse files Browse the repository at this point in the history
  • Loading branch information
Glutamat42 committed Dec 14, 2024
1 parent 297c010 commit be5f688
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,15 @@ jobs:
- name: remove files not needed for release
run: |
rm -rf .github tests vendor .gitignore composer.json composer.lock phpunit.xml dev_utils
rm -rf .github tests vendor .gitignore composer.json composer.lock phpunit.xml dev_utils phpunit.xml infection.json5
- name: Create release archives
run: |
tar --exclude='.git' -czf /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.tgz *
zip -x .git -r /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip *
- name: Calculate MD5 hash
run: |
md5sum /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.tgz > /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.tgz.md5
cd /tmp
md5sum /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip > /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip.md5
- name: Upload release archive (ZIP)
Expand All @@ -51,24 +50,12 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip
tag: ${{ github.ref_name }}
- name: Upload release archive (TGZ)
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.tgz
tag: ${{ github.ref_name }}
- name: Upload MD5 hash files (ZIP)
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip.md5
tag: ${{ github.ref_name }}
- name: Upload MD5 hash files (TGZ)
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /tmp/moodle-${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.tgz.md5
tag: ${{ github.ref_name }}

- name: Prepare release body (description)
id: prep_body
Expand Down

0 comments on commit be5f688

Please sign in to comment.