mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 17:22:41 +01:00
37 lines
929 B
YAML
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 }}
|