fix: Mimetype check on extension upload #850
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Liman CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Getting Main Liman Repository | |
uses: actions/checkout@v2 | |
with: | |
path: package/liman/server | |
- name: Set up Liman Environment | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
tools: composer | |
extensions: ssh2, curl, sqlite3, ldap, mbstring, xml, zip, posix, smbclient, gd | |
- name: Restore the Composer cache directory | |
id: composercache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-'8.1'-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-'8.1'-composer- | |
- name: Build Liman Package | |
env: | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
PASSPHRASE: ${{ secrets.PASSPHRASE }} | |
run: | | |
sudo apt install zip gpg curl jq wget -y | |
mkdir -p /home/runner/.gnupg | |
echo """ | |
use-agent | |
pinentry-mode loopback""" | sudo tee -a /home/runner/.gnupg/gpg.conf | |
echo "$PRIVATE_KEY" | gpg --import --batch --yes --passphrase $PASSPHRASE | |
VERSION=`cat package/liman/server/storage/VERSION` | |
MESSAGE="Branch: ${GITHUB_REF#refs/heads/} \n" | |
MESSAGE+="Version: $VERSION \n" | |
sudo chmod +x package/liman/server/storage/create_deb.sh | |
./package/liman/server/storage/create_deb.sh master master master master $GITHUB_RUN_NUMBER $PASSPHRASE | |
[ "$GITHUB_REF" == "refs/heads/master" ] && PRERELEASE=false || PRERELEASE=true | |
FILE_NAME="liman-$VERSION-$GITHUB_RUN_NUMBER" | |
FILE_NAME=$(echo $FILE_NAME | tr / -) | |
cp package.deb $FILE_NAME.deb | |
cp /tmp/package.rpm $FILE_NAME.rpm | |
echo "RELEASE_VER=$(echo $VERSION)" >> $GITHUB_ENV | |
echo "RELEASE_DEBFILENAME=$(echo $FILE_NAME.deb)" >> $GITHUB_ENV | |
echo "RELEASE_RPMFILENAME=$(echo $FILE_NAME.rpm)" >> $GITHUB_ENV | |
echo "RELEASE_RUNNUMBER=$(echo $GITHUB_RUN_NUMBER)" >> $GITHUB_ENV | |
echo "PRERELEASE=$(echo $PRERELEASE)" >> $GITHUB_ENV | |
echo "LIMAN_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
- name: Release 🚀 | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
files: | | |
${{ env.RELEASE_DEBFILENAME }} | |
${{ env.RELEASE_RPMFILENAME }} | |
name: "Release ${{ env.RELEASE_VER }} - ${{ env.RELEASE_RUNNUMBER }}" | |
tag_name: "release.${{ env.LIMAN_BRANCH }}.${{ env.RELEASE_RUNNUMBER }}" | |
prerelease: ${{ env.PRERELEASE }} |