Skip to content

Merge pull request #698 from joomlatools/feature/697-escape #308

Merge pull request #698 from joomlatools/feature/697-escape

Merge pull request #698 from joomlatools/feature/697-escape #308

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/github-slug-action@v2.x
- 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/github-release@2.0
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