Merge pull request #15 from dkjensen/feature/modal-capture #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install npm packages | |
run: | | |
npm i | |
- name: Semantic release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v2 | |
with: | |
semantic_version: 17 | |
branches: | | |
['master'] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set env | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Build release | |
if: steps.semantic.outputs.new_release_published == 'true' | |
shell: bash | |
run: | | |
npm run plugin-zip | |
- name: Release | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.semantic.outputs.new_release_version }} | |
files: | | |
build/wc-cart-pdf.zip | |
- name: WordPress Plugin Deploy | |
id: deploy | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: 10up/[email protected] | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SLUG: wc-cart-pdf | |
VERSION: ${{ steps.semantic.outputs.new_release_version }} | |
BUILD_DIR: build/wc-cart-pdf |