deployer/.github/workflows/release.yml
Anton Medvedev 652817516d =>
2021-10-21 23:16:33 +02:00

37 lines
929 B
YAML

name: release
on:
release:
types:
- created
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Build phar
run: php -d phar.readonly=0 bin/build -v"$RELEASE_VERSION"
- name: Verify version
run: php deployer.phar -V
- name: Upload phar
run: gh release upload v"$RELEASE_VERSION" deployer.phar
env:
GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
- name: Calculate sha1
run: echo "SHA1=$(sha1sum deployer.phar | awk '{print $1;}')" >> $GITHUB_ENV
- name: Release
uses: deployphp/action@v1
with:
private-key: ${{ secrets.PRIVATE_KEY }}
deployer-binary: bin/dep
dep: -f deploy.yaml release -o sha1=${{ env.SHA1 }} -o version=${{ env.RELEASE_VERSION }}