-
-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (44 loc) · 1.61 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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@v4"
- 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@v4"
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 and upload the zip
- name: "Create Release"
id: "create_release"
uses: "softprops/action-gh-release@v2"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
name: "Release ${{ github.ref_name }}"
files: "./build/btcpay.zip"
fail_on_unmatched_files: true
generate_release_notes: true