Skip to content

Commit

Permalink
Merge branch 'ci/release-current' into ci/input-release-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hsein-bitar committed Apr 17, 2023
2 parents 08468c5 + 24a4fa6 commit 3616ce3
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 114 deletions.
6 changes: 2 additions & 4 deletions .github/config/changelog_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
"categories": [
{
"title": "## Fixes",
"labels": ["bugfix", "bug"],
"empty_content": ""
"labels": ["bugfix", "bug"]
},
{
"title": "## Features and Improvements",
"labels": ["feature"],
"empty_content": ""
"labels": ["feature"]
}
],
"template": "${{CHANGELOG}}",
Expand Down
48 changes: 7 additions & 41 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,49 +104,15 @@ jobs:
- name: "Send Deploymnt Notification to Slack"
if: steps.deploy.outcome == 'success'
uses: slackapi/slack-github-action@v1.23.0
env:
JSON: "{\"text\":\"\\n:large_green_circle: Draw Attention ${{ github.event.release.tag_name }}\\nSuccessfully deployed to <https://wordpress.org/plugins/draw-attention|WordPress.org>\\n\",\"blocks\":[{\"type\":\"divider\"},{\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\"\\n:large_green_circle: Draw Attention ${{ github.event.release.tag_name }}\\n\"}},{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Successfully deployed to <https://wordpress.org/plugins/draw-attention|WordPress.org>\\n\"}}]}"
with:
payload: |
{
"text": ".\n\n\nDraw Attention ${{ steps.set_tag_name.outputs.tag_name }} :white_check_mark: :white_check_mark: :white_check_mark:\nSuccessfully deployed to <https://wordpress.org/plugins/draw-attention|WordPress.org>\n\n\n.",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ".\n\n\nDraw Attention ${{ steps.set_tag_name.outputs.tag_name }} :white_check_mark: :white_check_mark: :white_check_mark:"
}
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "Successfully deployed to <https://wordpress.org/plugins/draw-attention|WordPress.org>\n\n\n."
}
}
]
}
payload: ${{ env.JSON }}

- name: "Send WP Deployment Failure Warning to Slack"
if: steps.deploy.outcome != 'success'
uses: slackapi/slack-github-action@v1.23.0
env:
JSON: "{\"text\":\"\\n:red_circle: Draw Attention ${{ github.event.release.tag_name }}\\nFailed to deploy.\\n\\nKindly check if the official version is affected and attempt a fix / another release. <https://wordpress.org/plugins/draw-attention|WordPress.org>\\n\",\"blocks\":[{\"type\":\"divider\"},{\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\"\\n:red_circle: Draw Attention ${{ github.event.release.tag_name }}\\n\"}},{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Failed to deploy.\\n\\nKindly check if the official version is affected and attempt a fix / another release. <https://wordpress.org/plugins/draw-attention|WordPress.org>\\n\"}}]}"
with:
payload: |
{
"text": ".\n\n\nDraw Attention ${{ steps.set_tag_name.outputs.tag_name }} :red_circle: :red_circle: :red_circle:\nFailed to deploy.\n\nKindly check if the official version is affected and attempt a fix / another release. <https://wordpress.org/plugins/draw-attention|WordPress.org>\n\n\n.",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ".\n\n\nDraw Attention ${{ steps.set_tag_name.outputs.tag_name }} :red_circle: :red_circle: :red_circle:"
}
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "Failed to deploy.\n\nKindly check if the official version is affected and attempt a fix / another release. <https://wordpress.org/plugins/draw-attention|WordPress.org>\n\n\n."
}
}
]
}
payload: ${{ env.JSON }}
79 changes: 28 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
- name: "Checkout repository"
uses: actions/checkout@v3.3.0
# with:
# ssh-key: ${{ secrets.GH_ACTIONS_SSH_KEY }}
# ref: master
with:
ssh-key: ${{ secrets.GH_ACTIONS_SSH_KEY }}
ref: master

- name: "Check defined version type"
id: version
Expand All @@ -55,18 +55,18 @@ jobs:
else
echo "version=current" >> $GITHUB_OUTPUT
fi
# TODO remove
echo "version=patch" >> $GITHUB_OUTPUT
# =====================================
# Edit Release Version ================
# =====================================
- name: "Bump package.json version number"
if: ${{ steps.version.outputs.version != 'current' }}
- name: "Git Configuration"
run: |
git config --global user.email "nathan@tylerdigital.com"
git config --global user.name "tylerdigital"
- name: "Bump package.json version number"
if: ${{ steps.version.outputs.version != 'current' }}
run: |
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
- name: "Get Package Version"
Expand Down Expand Up @@ -168,12 +168,22 @@ jobs:
zip -r $ZIP_FILENAME draw-attention
echo "-Listing files in working directory-"
ls
# =====================================
# Cleanup if Needed ===============
# =====================================
- name: "If releasing current, delete tag to avoid conflict"
uses: dev-drprasad/delete-tag-and-release@v1.0
if: ${{ steps.version.outputs.version != 'current' }}
with:
tag_name: "${{ steps.package-version.outputs.current-version }}"
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_release: false

# =====================================
# Create GitHub release ===============
# =====================================
- name: "GH Release"
if: ${{ steps.version.outputs.version != 'current' }}
uses: softprops/action-gh-release@v0.1.15
env:
ZIP_FILENAME: "${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}-prerelease.zip"
Expand All @@ -191,51 +201,18 @@ jobs:
- name: "Send Dev Changelog Notification to Slack"
if: success()
uses: slackapi/slack-github-action@v1.23.0
env:
JSON: "{\"text\":\"\\n:large_green_circle: Draw Attention ${{ steps.package-version.outputs.current-version }}\\nSuccessfully Prepared GitHub release.:fox-dance:\\nChangelog:\\n${{steps.build_dev_changelog.outputs.changelog}}\\n\",\"blocks\":[{\"type\":\"divider\"},{\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\"\\n:large_green_circle: Draw Attention ${{ steps.package-version.outputs.current-version }}\\n\"}},{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Successfully Prepared GitHub release.:fox-dance:\\nChangelog:\\n${{steps.build_dev_changelog.outputs.changelog}}\\n\"}}]}"
with:
payload: |
{
"text": ".\n\n\nDraw Attention ${{ steps.package-version.outputs.current-version }} :large_green_circle: :large_green_circle: :large_green_circle:\nSuccessfully Prepared GitHub release.:fox-dance:\n\n-Changelog:\n${{steps.build_dev_changelog.outputs.changelog}}\n\n\n.",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ".\n\n\nDraw Attention ${{ steps.package-version.outputs.current-version }} :large_green_circle: :large_green_circle: :large_green_circle:"
}
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "Successfully Prepared GitHub release.:fox-dance:\n\n*Changelog:*\n${{steps.build_dev_changelog.outputs.changelog}}\n\n\n."
}
}
]
}
payload: ${{ env.JSON }}

# =====================================
# Send Failure Warning to Slack =====
# =====================================
- name: "Send Failure Warning to Slack"
if: failure()
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.23.
env:
JSON: "{\"text\":\"\\n:red_circle: Draw Attention ${{ steps.package-version.outputs.current-version }}\\nFailed to Prepare GitHub release.\\n\\nKindly check what went wrong, or try triggering the release workflow again.\\n\",\"blocks\":[{\"type\":\"divider\"},{\"type\":\"header\",\"text\":{\"type\":\"plain_text\",\"text\":\"\\n:red_circle: Draw Attention ${{ steps.package-version.outputs.current-version }}\\n\"}},{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"Failed to Prepare GitHub release.\\n\\nKindly check what went wrong, or try triggering the release workflow again.\\n\"}}]}"
with:
payload: |
{
"text": ".\n\n\nDraw Attention ${{ steps.package-version.outputs.current-version }} :red_circle: :red_circle: :red_circle:\nFailed to Prepare GitHub release.\n\nKindly check what went wrong, or try triggering the release workflow again.\n\n\n.",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ".\n\n\nDraw Attention ${{ steps.package-version.outputs.current-version }} :red_circle: :red_circle: :red_circle:"
}
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "Failed to Prepare GitHub release.\n\nKindly check what went wrong, or try triggering the release workflow again.\n\n\n."
}
}
]
}
payload: ${{ env.JSON }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 2.0.9 - 2023-04-11

### Fixes

### Features and Improvements

## 2.0.8 - 2023-03-28

### Fixes

### Features and Improvements

## 2.0.7 - 2023-03-28

- no changes
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/draw-attention/trunk/CHANGELOG.md) delivered with the plugin.
For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/draw-attention/trunk/CHANGELOG.md) delivered with the plugin.
For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/draw-attention/trunk/CHANGELOG.md) delivered with the plugin.
For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/draw-attention/trunk/CHANGELOG.md) delivered with the plugin.
For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/draw-attention/trunk/CHANGELOG.md) delivered with the plugin.
Binary file added assets/repo/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion draw-attention.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Plugin Name: Draw Attention
Plugin URI: https://wpdrawattention.com
Description: Create interactive images in WordPress
Version: 2.0.7
Version: 2.0.9
Author: N Squared
Author URI: https://nsqua.red
Text Domain: draw-attention
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "draw-attention",
"title": "Draw Attention",
"version": "2.0.7",
"version": "2.0.9",
"description": "Create interactive image maps for your website",
"author": {
"name": "NSquared",
Expand Down
2 changes: 1 addition & 1 deletion public/class-drawattention.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DrawAttention {
*
* @var string
*/
const VERSION = '2.0.7';
const VERSION = '2.0.9';
const file = __FILE__;
const name = 'Draw Attention';
const slug = 'drawattention';
Expand Down
29 changes: 14 additions & 15 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: tylerdigital, nataliemac, croixhaug, wpdrawattention
Tags: image maps, image map, floor plan, interactive images, clickable images, hotspots, infographic, highlight, annotation, real estate, interactive floor plan, affiliate
Requires at least: 3.5.1
Tested up to: 6.1
Stable tag: 2.0.7
Tested up to: 6.2
Stable tag: 2.0.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -110,6 +110,18 @@ We have a guide walkthrough of creating your first image available in [our docum

# Changelog

## 2.0.9 - 2023-04-11

### Fixes

### Features and Improvements

## 2.0.8 - 2023-03-28

### Fixes

### Features and Improvements

## 2.0.7 - 2023-03-28

- no changes
Expand Down Expand Up @@ -166,17 +178,4 @@ We have a guide walkthrough of creating your first image available in [our docum

- Improved: Updated plugin author contact details

## 1.9.29

- Fixed: Unexpected behavior on hover

## 1.9.28

- Fixed: Plugin URI
- Fixed: Accessibility typo

## 1.9.27

- Improved: Translation support


0 comments on commit 3616ce3

Please sign in to comment.