0.4.9 #50
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 23 | |
with: | |
distribution: "temurin" | |
java-version: 23 | |
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/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 | |
github-packages-build-push: | |
name: Build and Push to GitHub Packages | |
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 }} | |
docker-registry-build-push: | |
name: Build and Push to Docker Registry | |
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 -u $USERNAME --password-stdin | |
env: | |
PACKAGES_WRITE_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
USERNAME: vacxe | |
- name: Docker Build | |
run: docker build -t vacxe/google-play-cli:$VERSION --build-arg="PLAY_CLI_VERSION=$VERSION" . | |
env: | |
VERSION: ${{ steps.get_release.outputs.tag_name }} | |
- name: Deploy | |
run: docker push vacxe/google-play-cli:$VERSION | |
env: | |
VERSION: ${{ steps.get_release.outputs.tag_name }} |