1 name: Generate release packages
11 uses: actions/checkout@v2
13 - name: Setup PHP, with composer and extensions
14 uses: shivammathur/setup-php@v2
16 tools: pecl, composer:v1
18 - name: Retrieve version
20 run: echo "::set-output name=version::$(cat VERSION)"
22 - name: Validate composer.json and composer.lock
23 run: composer validate
25 - name: Get composer cache directory
27 run: echo "::set-output name=dir::$(composer config cache-files-dir)"
29 - name: Cache dependencies
30 uses: actions/cache@v2
32 path: ${{ steps.composercache.outputs.dir }}
33 key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
34 restore-keys: ${{ runner.os }}-composer-
36 - name: Install dependencies
37 run: composer install --no-dev --optimize-autoloader
39 - name: Create artifact
42 ARTIFACT="friendica-full-${{ steps.release.outputs.version }}.tar.gz"
43 echo "::set-output name=name::${ARTIFACT}"
45 tar -cvjf build/${ARTIFACT} -T mods/release-list.txt
51 ARTIFACT=${{ steps.artifact.outputs.name }}
52 sha256sum "${ARTIFACT}" > "${ARTIFACT}.sha256"
54 - name: Upload artifact
55 uses: actions/upload-artifact@v2
60 - name: Upload to release
61 uses: softprops/action-gh-release@v1
64 build/${{ steps.artifact.outputs.name }}.tar.gz
65 build/${{ steps.artifact.outputs.name }}.tar.gz.sha256
67 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}