0.4.4 #44
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Release | |
on: | |
release: | |
types: [ created ] | |
jobs: | |
release-tar: | |
name: Build release Tar | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
name: Set up JDK 11 | |
with: | |
distribution: "temurin" | |
java-version: 11 | |
cache: gradle | |
- 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/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload artifacts to release | |
uses: actions/[email protected] | |
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/[email protected] | |
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 }} |