1.3.1 Correção de bugs #7
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: Generate new release for plugin | |
on: | |
pull_request: | |
types: [ closed ] | |
branches: [ main ] | |
env: | |
PLUGIN_NAME: give-antispam | |
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 | |
run: "mkdir $PLUGIN_NAME && mv -t ./$PLUGIN_NAME ./admin ./includes ./languages ./logs ./public *.php && 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' | |
# Update version tag // TODO remove custom_tag | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/github-tag-action@v6.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: '1.3.1' | |
# Generate new release | |
- name: Generate new Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "${{ env.PLUGIN_NAME }}.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit: "main" | |
draft: true | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: Release ${{ steps.tag_version.outputs.new_tag }} |