Skip to content

Commit

Permalink
Rebuild to create also the release
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Wolf committed Feb 22, 2023
1 parent 5f6a58e commit c6e5447
Showing 1 changed file with 53 additions and 15 deletions.
68 changes: 53 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Pack Release Zip
name: Create Release Page
on:
release:
types: [published]
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -36,19 +38,55 @@ jobs:
version: 2.2.x
php_extensions: zip gd xsl
- name: Pack release zip
run: zip -ry ../ILIAS-${VERSION}.zip ./
run: zip -ry ../release.zip ./
- name: Pack release tar
run: tar -zcvf ../ILIAS-${VERSION}.tar.gz ./
run: tar -zcvf ../release.tar.gz ./
- name: MD5sum
run: |
mv ../ILIAS-${VERSION}.zip .
mv ../ILIAS-${VERSION}.tar.gz .
md5sum ILIAS-${VERSION}.zip
ls -hs ILIAS-${VERSION}.zip
md5sum ILIAS-${VERSION}.tar.gz
ls -hs ILIAS-${VERSION}.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v2
mv ../release.zip .
mv ../release.tar.gz .
md5_zip=($(md5sum release.zip))
size_zip=($(ls -hs release.zip))
echo "release.zip [$md5_zip]($size_zip)"
md5_tar=($(md5sum release.zip))
size_tar=($(ls -hs release.zip))
echo "release.tar.gz [$md5_tar]($size_tar)"
echo "MD5_ZIP=$md5_zip" >> $GITHUB_ENV
echo "SIZE_ZIP=$size_zip" >> $GITHUB_ENV
echo "MD5_TAR=$md5_tar" >> $GITHUB_ENV
echo "SIZE_TAR=$size_tar" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.DEPLOYMENT_TOKEN }}
with:
name: release-artifact
path: ILIAS-${VERSION}.*
tag_name: ${{ github.ref }}
release_name: Release ${VERSION}
body: |
Maintenance release for ILIAS 7.
More information about the release at https://docu.ilias.de/goto_docu_lm_35.html
Use the pre-packed files ILIAS-$VERSION.tar.gz[$MD5_TAR]($SIZE_TAR) or ILIAS-$VERSION.zip[$MD5_ZIP]($SIZE_ZIP) for download and installing ILIAS and ignore the files offered by GitHub (called 'Source Code') to prevent problems with composer.
draft: false
prerelease: false
- name: Upload Release Asset (ZIP)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.DEPLOYMENT_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./release.zip
asset_name: ILIAS-${VERSION}.zip
asset_content_type: application/zip
- name: Upload Release Asset (TAR)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./release.tar.gz
asset_name: ILIAS-${VERSION}.tar.gz
asset_content_type: application/x-gtar

0 comments on commit c6e5447

Please sign in to comment.