Skip to content

Feat: Download saves (#5) #17

Feat: Download saves (#5)

Feat: Download saves (#5) #17

Workflow file for this run

name: Create Release
concurrency: release
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Extract Version Name
id: extract_name
uses: actions/github-script@v4
with:
result-encoding: string
script: |
return context.payload.ref.replace(/refs\/tags\/v/, '');
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Dependencies
run: composer install --no-dev
- name: Set version
env:
VERSION: ${{ steps.extract_name.outputs.result }}
run: echo $VERSION > bin/appversion
- name: Download phar builder
run: wget https://github.com/clue/phar-composer/releases/download/v1.3.0/phar-composer-1.3.0.phar -O phar-composer.phar
- name: Create PHAR
run: php -d phar.readonly=off phar-composer.phar build . gog-downloader.phar
- name: Rename
run: mv gog-downloader.phar gog-downloader
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: rikudousage
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
tags: rikudousage/gog-downloader:${{ steps.extract_name.outputs.result }},rikudousage/gog-downloader:latest
push: true
- name: Create a Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ steps.extract_name.outputs.result }}
draft: false
prerelease: false
body: |
Either download the `gog-downloader` php binary below or use docker image `rikudousage/gog-downloader:${{ steps.extract_name.outputs.result }}`.
files: |
gog-downloader