Skip to content

Merge branch 'release/4.1.12' #277

Merge branch 'release/4.1.12'

Merge branch 'release/4.1.12' #277

Workflow file for this run

name: Release and publish
on:
push:
tags:
- "*"
branches:
- "develop"
- "feature/*"
env:
COMPOSER_FLAGS: --ansi --no-interaction --no-progress --no-suggest --prefer-dist --no-dev
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 7.4
steps:
- name: Get convenient env variables
uses: FranzDiebold/[email protected]
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: soap
ini-values: memory_limit=-1, phar.readonly=Off
php-version: ${{ matrix.php-version }}
- name: Display PHP Version
run: php -v
- name: Display release name
run: echo $GITHUB_REF_NAME_SLUG
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get convenient Docker Meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: mikaelcom/wsdltophp
- name: Install dependencies from composer.lock
run: composer install ${{ env.COMPOSER_FLAGS }}
- name: Validate composer.json
run: composer validate
- name: Install Box2
run: curl -LSs https://box-project.github.io/box2/installer.php | php
- name: Build phar file
run: mkdir bin; php box.phar build
- name: Display generated wsdltophp version
run: php bin/wsdltophp.phar --version
- name: Configure GPG key and sign phar
run: |
mkdir -p ~/.gnupg/
chmod 0700 ~/.gnupg/
export GPG_TTY=$(tty)
echo "$GPG_SIGNING_KEY" > ~/.gnupg/private.key
gpg --import ~/.gnupg/private.key
gpg -u [email protected] --detach-sign --output wsdltophp.phar.asc ./bin/wsdltophp.phar
env:
GPG_SIGNING_KEY: |
${{ secrets.GPG_SIGNING_KEY }}
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.GITHUB_REF_NAME }}
name: ${{ env.GITHUB_REF_NAME }} - PHP ${{ matrix.php-version }}
draft: true
prerelease: true
body: TODO
files: |
./bin/wsdltophp.phar
./wsdltophp.phar.asc
- name: Setup Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_SECRET }}
- name: Build and push to Docker
uses: docker/build-push-action@v2
with:
context: .
push: true
file: .github/Dockerfile
build-args: |
PHP=${{ matrix.php-version }}
WSDLTOPHP=${{ env.GITHUB_REF_NAME }}
PHAR=./bin/wsdltophp.phar
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}