-
Notifications
You must be signed in to change notification settings - Fork 11
67 lines (53 loc) · 1.75 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build package
on:
repository_dispatch:
push:
tags:
- v*
branches: # Add your feature branch here if you want a release and package generated for it
- master
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Figure out tag name (v1.x.y or dev-branch)
id: tagname
run: |
if [[ "${REF:0:1}" == "v" ]];
then
echo "::set-output name=tag::$REF";
else
echo "::set-output name=tag::dev-$REF";
fi;
env:
REF: ${{ env.GITHUB_REF_SLUG }}
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm i -g @joomlatools/mason
- run: mason build --config.githubToken=${{ secrets.JOOMLATOOLS_BUILDS_GITHUB_TOKEN }} --config.appendVersion=true --verbose --debug
- name: Create release
uses: meeDamian/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.tagname.outputs.tag }}
name: ${{ env.GITHUB_REF_SLUG }}
allow_override: true
- name: Upload package to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.tagname.outputs.tag }}
file: ${{ github.workspace }}/joomlatools-framework*.zip
file_glob: true
overwrite: true
# Uncomment this to set up an SSH connection to the workflow
# - name: Setup tmate SSH session
# uses: mxschmitt/action-tmate@v2