Skip to content

2.0.0 - Refatoração completa do plugin e adição do 3DS 2.0 do Erede para cartão de crédito #4

2.0.0 - Refatoração completa do plugin e adição do 3DS 2.0 do Erede para cartão de crédito

2.0.0 - Refatoração completa do plugin e adição do 3DS 2.0 do Erede para cartão de crédito #4

Workflow file for this run

name: Generate new release for plugin
on:
pull_request:
types: [closed]
branches: [main]
env:
PLUGIN_NAME: payment-erede-for-givewp
PLUGIN_NAME_WITH_UPDATER: payment-erede-for-givewp-updt
jobs:
release-build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
# Add plugin files to a root directory
- name: Make plugin root directory with auto-updater
run: "mkdir ${{env.PLUGIN_NAME_WITH_UPDATER}} && cp -r ./languages ./admin ./includes ./public LICENSE *.php ./${{env.PLUGIN_NAME_WITH_UPDATER}}/ && find ./${{env.PLUGIN_NAME_WITH_UPDATER}} -type f -exec chmod 0644 {} + && find ./${{env.PLUGIN_NAME_WITH_UPDATER}} -type d -exec chmod 0755 {} + && ls -lah"
- name: Make plugin root directory
run: "rm -Rf ./includes/plugin-updater && mkdir ${{env.PLUGIN_NAME}} && mv -t ./${{env.PLUGIN_NAME}} ./languages ./admin ./includes ./public LICENSE *.php *.txt && find ./${{env.PLUGIN_NAME}} -type f -exec chmod 0644 {} + && find ./${{env.PLUGIN_NAME}} -type d -exec chmod 0755 {} + && ls -lah"
# Compact plugin as .zip
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: "zip"
path: "${{ env.PLUGIN_NAME }}"
directory: "."
filename: "${{ env.PLUGIN_NAME }}.zip"
exclusions: "*.git* /*node_modules/* .editorconfig"
- name: Archive Release with auto-updater
uses: thedoctor0/zip-release@master
with:
type: "zip"
path: "${{ env.PLUGIN_NAME_WITH_UPDATER }}"
directory: "."
filename: "${{ env.PLUGIN_NAME_WITH_UPDATER }}.zip"
exclusions: "*.git* /*node_modules/* .editorconfig"
# Update version tag
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Generate new release
- name: Generate new Release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ env.PLUGIN_NAME }}.zip,${{env.PLUGIN_NAME_WITH_UPDATER}}.zip"
token: ${{ secrets.GITHUB_TOKEN }}
commit: "main"
draft: true
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}