Skip to content

Merge pull request #706 from joomlatools/feature-657-json #321

Merge pull request #706 from joomlatools/feature-657-json

Merge pull request #706 from joomlatools/feature-657-json #321

Workflow file for this run

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