Skip to content

Merge pull request #12 from utrustdev/omondifadhili/ptf-879-update-wo… #29

Merge pull request #12 from utrustdev/omondifadhili/ptf-879-update-wo…

Merge pull request #12 from utrustdev/omondifadhili/ptf-879-update-wo… #29

Workflow file for this run

name: Create a new Release on GitHub and on Wordpress
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0.0, v1.2.3-beta4
jobs:
build-and-create:
runs-on: ubuntu-latest
container:
image: composer:1.9
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Display PHP and Composer info
run: |
php -v
composer --version
- name: Install project dependencies
run: composer install
- name: WordPress Plugin Deploy to Directory
uses: 10up/action-wordpress-plugin-deploy@master
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
- name: Build zip with the code
run: |
zip -r utrust-for-woocommerce * -x .git .github composer.json composer.lock
- name: Create Release on GitHub
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- name: Upload zip to GitHub release assets
id: upload_release_asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./utrust-for-woocommerce.zip
asset_name: utrust-for-woocommerce.zip
asset_content_type: application/zip