-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,272 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Version Bump | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
version-bump: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get latest tag | ||
id: get_latest_tag | ||
run: echo "LATEST_TAG=$(git describe --tags --abbrev=0 || echo v0.0.0)" >> $GITHUB_OUTPUT | ||
|
||
- name: Bump version and push tag | ||
id: bump_version | ||
run: | | ||
# Extract version number and increment patch | ||
version=$(echo ${{ steps.get_latest_tag.outputs.LATEST_TAG }} | sed 's/v//') | ||
IFS='.' read -ra ADDR <<< "$version" | ||
new_patch=$((ADDR[2] + 1)) | ||
new_version="${ADDR[0]}.${ADDR[1]}.$new_patch" | ||
echo "NEW_VERSION=v$new_version" >> $GITHUB_OUTPUT | ||
# Configure Git | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
# Create and push new tag | ||
git tag v$new_version | ||
git push origin v$new_version | ||
outputs: | ||
new_version: ${{ steps.bump_version.outputs.NEW_VERSION }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get the version | ||
id: get_version | ||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | ||
|
||
- name: Replace version in PHP file | ||
run: sed -i 's/{{VERSION}}/${{ steps.get_version.outputs.VERSION }}/g' src/betterportal-theme-embedded.php | ||
|
||
- name: Create release folder | ||
run: mkdir betterportal-theme-embedded | ||
|
||
- name: Copy files to release folder | ||
run: | | ||
cp -R src/* betterportal-theme-embedded/ | ||
cp README.md betterportal-theme-embedded/ | ||
cp LICENSE betterportal-theme-embedded/ | ||
- name: Create ZIP archive | ||
run: zip -r betterportal-theme-embedded.zip betterportal-theme-embedded | ||
|
||
- name: Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release create ${{ steps.get_version.outputs.VERSION }} \ | ||
--title "Release ${{ steps.get_version.outputs.VERSION }}" \ | ||
--notes "Release ${{ steps.get_version.outputs.VERSION }}" \ | ||
betterportal-theme-embedded.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/dist | ||
/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# BetterPortal Embedded Theme | ||
|
||
This plugin pulls in pages hosted with BetterPortal Embedded Theme and displays them within your WP site. | ||
|
||
NOTE: If you are not using BetterPortal, then do not install this plugin. | ||
|
||
## Installation | ||
|
||
1. Install the plugin via the WordPress admin. | ||
2. Activate the plugin. | ||
3. Use the [betterportal_embed] shortcode in your posts or pages - or use the Elementor Widget. | ||
|
||
See your BetterPortal admin portal for more information. | ||
|
||
Reference: [https://betterportal.cloud](https://betterportal.cloud) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$1" ]; then | ||
echo "Usage: $0 <version>" | ||
exit 1 | ||
fi | ||
|
||
VERSION=$1 | ||
SOURCE_DIR="src/*" | ||
BUILD_DIR="build" | ||
DIST_DIR="dist" | ||
|
||
rm -rf $DIST_DIR $BUILD_DIR | ||
mkdir -p $BUILD_DIR $DIST_DIR | ||
cp -r $SOURCE_DIR $BUILD_DIR | ||
cp README.md $BUILD_DIR/README.txt | ||
cp LICENSE $BUILD_DIR/LICENSE.txt | ||
|
||
sed -i "s/{{VERSION}}/$VERSION/g" $BUILD_DIR/* | ||
sed -i "s/{{VERSION}}/$VERSION/g" $BUILD_DIR/**/* | ||
|
||
zip -r $DIST_DIR/betterportal-theme-embedded-$VERSION.zip $BUILD_DIR | ||
|
||
rm -rf $BUILD_DIR |
Oops, something went wrong.