-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (48 loc) · 1.57 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
49
on:
push:
tags:
- '*' # It will create for all tags a draft release
name: Upload Release Asset
jobs:
build:
name: Upload Release Asset OC 3.0
runs-on: ubuntu-latest
steps:
- name: Install Hub
run: |
sudo apt-get update
sudo apt-get install -y hub
- name: Setup PHP 7.2
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Checkout code
uses: actions/checkout@v2
- name: Build project PHP 7.2. Versions 2.0.0.0 - 3.0.3.8
run: ./bin/release.sh ${{ steps.get_version.outputs.VERSION }}
- name: Setup PHP 7.3
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
- name: Build project PHP 7.3. Version 3.0.3.9
run: ./bin/release-oc-3-0-3-9.sh ${{ steps.get_version.outputs.VERSION }} 7
- name: Setup PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Build project PHP 8.2. Version 3.0.3.9
run: ./bin/release-oc-3-0-3-9.sh ${{ steps.get_version.outputs.VERSION }} 8
- name: Upload Release Asset
run: |
set -x
assets=()
for asset in ./.dist/*.ocmod.zip; do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "Release $tag_name" "$tag_name" -d
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}