Skip to content

Deploy Release

Deploy Release #32

Workflow file for this run

name: Deploy Release
on:
release:
types: [ created ]
jobs:
release-tar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
- name: Build release tar
run: ./gradlew distTar
- name: Tar Checksum
run: shasum -a 256 build/distributions/google-play-cli.tar
- name: Get release information
id: get_release
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload artifacts to release
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./build/distributions/google-play-cli.tar
asset_name: google-play-cli.tar
asset_content_type: application/x-tar
docker-build-push:
name: Build and Push Docker image
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
needs: [ release-tar ]
steps:
- uses: actions/checkout@v4
- name: Get release information
id: get_release
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Docker Login
run: echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
env:
PACKAGES_WRITE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.actor }}
- name: Docker Build
run: docker build -t ghcr.io/vacxe/google-play-cli:$VERSION --build-arg="PLAY_CLI_VERSION=$VERSION" .
env:
VERSION: ${{ steps.get_release.outputs.tag_name }}
- name: Deploy
run: docker push ghcr.io/vacxe/google-play-cli:$VERSION
env:
VERSION: ${{ steps.get_release.outputs.tag_name }}