Skip to content

[Core] Resolve installation failure (#101) #30

[Core] Resolve installation failure (#101)

[Core] Resolve installation failure (#101) #30

Workflow file for this run

name: "Release"
on:
push:
tags: [ 'v*' ] # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
linting:
name: "Release a new ZIP"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2" # https://github.com/shivammathur/setup-php
with:
php-version: "8.0"
extensions: "mbstring, xml, ctype, iconv, intl, gd"
tools: "composer:v2"
- name: "Get composer cache directory"
id: "composer-cache"
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
- name: "Cache composer dependencies"
uses: "actions/cache@v3"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "${{ runner.os }}-composer-"
- name: "Validate composer"
run: "composer validate"
- name: "Install Composer dependencies"
run: "composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader"
# Zip the module
- name: "Make zip"
run: "make"
# Make a release from the tag
- name: "Create Release"
id: "create_release"
uses: "actions/create-release@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # This token is provided by Actions, you do not need to create your own token
with:
tag_name: "${{ github.ref }}"
release_name: "Release ${{ github.ref }}"
# Upload the zip to the release
- name: "Upload Release Asset"
id: "upload-release-asset"
uses: "actions/upload-release-asset@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
upload_url: "${{ steps.create_release.outputs.upload_url }}" # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: "./build/btcpay.zip"
asset_name: "btcpay.zip"
asset_content_type: "application/zip"