Skip to content

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Feb 4, 2025
2 parents 1c14f41 + 181610a commit b9e621e
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 7 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [1.0.2] - 2025-02-04

### Fixed

- Handle the error `detected dubious ownership in repository at '/github/workspace'` when using a `.gitattributes` file (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh) via [#7](https://github.com/10up/action-wordpress-plugin-build-zip/pull/7)).
- Ensure built files are included when used without a `BUILD_DIR` and `.distignore` file (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh) via [#7](https://github.com/10up/action-wordpress-plugin-build-zip/pull/7)).
- Install SVN as part of the workflow, if needed (props [@kirtangajjar](https://github.com/kirtangajjar), [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#8](https://github.com/10up/action-wordpress-plugin-build-zip/pull/8)).

### Developer

- Replaced `lee-dohm/no-response` with `actions/stale` to help with closing no-response/stale issues (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#5](https://github.com/10up/action-wordpress-plugin-build-zip/pull/5)).

## [1.0.1] - 2024-03-20

### Changed
- Updated to v4 of `upload-artifact`, the action now exposes the artifact URL with: `${{ steps.upload-plugin-artifact.outputs.artifact-url }}` (props [@jdevalk](https://github.com/jdevalk) via [#3](https://github.com/10up/action-wordpress-plugin-build-zip/pull/3)).

- Updated to v4 of `upload-artifact`, the action now exposes the artifact URL with: `${{ steps.upload-plugin-artifact.outputs.artifact-url }}` (props [@jdevalk](https://github.com/jdevalk), [@dkotter](https://github.com/dkotter) via [#3](https://github.com/10up/action-wordpress-plugin-build-zip/pull/3)).

## [1.0.0] - 2022-12-01

- Initial release.

[Unreleased]: https://github.com/10up/action-wordpress-plugin-build-zip/compare/stable...develop
[1.0.2]: https://github.com/10up/action-wordpress-plugin-build-zip/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/10up/action-wordpress-plugin-build-zip/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/10up/action-wordpress-plugin-build-zip/releases/tag/1.0.0
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo

Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.

[Darin Kotter (@dkotter)](https://github.com/dkotter), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Joost de Valk (@jdevalk)](https://github.com/jdevalk).
[Darin Kotter (@dkotter)](https://github.com/dkotter), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Joost de Valk (@jdevalk)](https://github.com/jdevalk), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Kirtan Gajjar (@kirtangajjar)](https://github.com/kirtangajjar), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi).

## Libraries

Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build plugin # Remove or modify this step as needed
run: |
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build plugin # Remove or modify this step as needed
run: |
Expand Down Expand Up @@ -133,6 +133,4 @@ Our GitHub Actions are available for use and remix under the MIT license.
## Like what you see?
<p align="center">
<a href="http://10up.com/contact/"><img src="https://10up.com/uploads/2016/10/10up-Github-Banner.png" width="850"></a>
</p>
[![Work with 10up](https://10up.com/uploads/2016/10/10up-Github-Banner.png)](http://10up.com/contact/)
39 changes: 39 additions & 0 deletions build-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@
# it does not exit with a 0, and we only care about the final exit.
set -eo

# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}

# Check if SVN is installed
if command_exists svn; then
echo "SVN is already installed."
else
echo "SVN is not installed. Installing SVN..."

# Update the package list
sudo apt-get update -y

# Install SVN
sudo apt-get install -y subversion

# Verify installation
if command_exists svn; then
echo "SVN was successfully installed."
else
echo "Failed to install SVN. Please check your system configuration."
exit 1
fi
fi

# Allow some ENV variables to be customized
if [[ -z "$SLUG" ]]; then
SLUG=${GITHUB_REPOSITORY#*/}
Expand Down Expand Up @@ -51,9 +77,22 @@ if [[ "$BUILD_DIR" = false ]]; then
TMP_DIR="${HOME}/archivetmp"
mkdir "$TMP_DIR"

# Workaround for: detected dubious ownership in repository at '/github/workspace' issue.
# See: https://github.com/10up/action-wordpress-plugin-deploy/issues/116
# Mark github workspace as safe directory.
git config --global --add safe.directory "$GITHUB_WORKSPACE"

git config --global user.email "[email protected]"
git config --global user.name "10upbot on GitHub"

# Ensure git archive will pick up any changed files in the directory.
# See https://github.com/10up/action-wordpress-plugin-deploy/pull/130
test "$(git ls-files --deleted)" && git rm "$(git ls-files --deleted)"
if [ -n "$(git status --porcelain --untracked-files=all)" ]; then
git add .
git commit -m "Include build step changes"
fi

# If there's no .gitattributes file, write a default one into place
if [[ ! -e "$GITHUB_WORKSPACE/.gitattributes" ]]; then
cat > "$GITHUB_WORKSPACE/.gitattributes" <<-EOL
Expand Down

0 comments on commit b9e621e

Please sign in to comment.