-
Notifications
You must be signed in to change notification settings - Fork 25
43 lines (41 loc) · 1.45 KB
/
build-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
name: build-release
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install nodejs
uses: actions/setup-node@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
- name: Install node packages
run: npm install
- name: Set release version as tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Make build script executable
run: sudo chmod a+x ./utils/uzerp-make-release
- name: Build release
run: ./utils/uzerp-make-release -r $RELEASE_VERSION -w /tmp
- name: Generate md5 hash
run: echo "RELEASE_HASH=$(md5sum /tmp/release-uzerp-${{ env.RELEASE_VERSION }}.tar.gz | awk '{ print $1 }')" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE_VERSION }}
name: "uzERP ${{ env.RELEASE_VERSION}}"
body: |
See https://github.com/uzerpllp/uzerp/blob/${{ env.RELEASE_VERSION}}/CHANGELOG.md for notable changes since the last uzERP release.
md5: ${{ env.RELEASE_HASH}}
draft: false
prerelease: true
files: "/tmp/release-uzerp-${{ env.RELEASE_VERSION }}.tar.gz"