Nagram/.github/workflows/release.yml
2020-08-10 10:23:50 +00:00

36 lines
967 B
YAML

name: Release Build
on:
push:
tags:
- 'v*'
jobs:
releaseBuild:
name: Release Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle') }}
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: assembleRelease
run: |
sudo bash <<EOF
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
rm -rf /root/.ssh
mkdir -p /root/.ssh
echo "${{ secrets.SSH_KEY }}" > $HOME/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa
cat > service_account_credentials.json << EOX
${{ secrets.GOOGLE_ACCOUNT_SERVICE }}
EOX
ref="${{ github.ref }}"
ref=${ref/"refs/tags/"/}
./bin/release.sh "$ref"
EOF